Skip to content
All library documents

Synthesizing Daily Bars and Loading Historical Data in VeighNa

Article vn.py community

Summary

This forum discussion addresses how a VeighNa portfolio strategy should create daily bars and initialize technical indicators from historical data. A user proposes emitting completed daily bars based on exchange-specific end times, while accounting for midnight timestamps in downloaded daily history and for initialization callbacks that may also invoke bar processing. The exchange-specific timing logic is raised as a question, not validated in the thread.

A reply clarifies the data-loading approach: if the strategy needs existing daily bars to calculate indicators, its history-loading callback should be a daily-bar handler. The response also states that the CTP interface does not provide historical data downloads, so the thread does not establish CTP as a source for those bars. It offers implementation guidance rather than a tested solution, and leaves the original timing code unresolved.

Key ideas

  • Daily bar synthesis can depend on exchange-specific session end times.
  • Historical daily bars timestamped at midnight may need to be handled during initialization.
  • Loading daily history for indicators calls for a daily-bar callback rather than a bar aggregation handler.
  • The discussion says CTP does not supply historical data downloads.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.