Skip to content
All library documents

Accessing Account Positions from a VeighNa CTA Strategy

Article vn.py community

Summary

This brief forum exchange addresses how a VeighNa CTA strategy can read an account’s current position when it initializes. One participant asks whether a framework function exists, noting that calling the main engine’s position lookup directly did not seem usable in their context. Another suggests accessing the main engine through the CTA engine and consulting the template’s price-tick accessor for the appropriate calling pattern.

The exchange gives a practical pointer for framework-level position retrieval, but it does not show a full implementation, explain initialization timing or position synchronization, or discuss edge cases such as multiple accounts or contracts. The suggested method should be checked against the relevant VeighNa version and strategy template. It is an implementation note about obtaining portfolio state, rather than a trading signal or strategy evaluation.

Key ideas

  • A CTA strategy may need to inspect existing account positions during initialization.
  • The reply points to accessing the main engine through the CTA engine.
  • The template’s price-tick accessor is suggested as a model for using the API.
  • The exchange does not provide a complete example or discuss version-specific behavior.

Tags

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