How VeighNa Portfolio Strategies Restore and Track Position Data
Summary
The discussion explains how a VeighNa portfolio strategy handles its own position state. The strategy position data is stored in the portfolio strategy data JSON file and read when the strategy starts, so saved values can initialize the strategy’s internal position. The forum identifies `pos_data` as the relevant field and suggests tracing trade-event processing when recorded positions do not match expectations.
A central distinction is that manual orders do not update the strategy’s internal position automatically. Consequently, a live or simulated strategy may report zero through its position-reading function even when the account has a filled manual trade; the strategy position must be adjusted separately. The post also says backtests do not read the JSON file, which can explain differences between backtest and live behavior. It offers troubleshooting guidance but no verified procedure for editing the file, and it does not establish that clearing the file is safe.
Key ideas
- The portfolio strategy reads saved position data from its JSON file when it starts.
- Manual orders do not automatically change the strategy’s internal position.
- A strategy-reported position can differ from the account’s actual holdings.
- Backtests do not initialize positions from the portfolio strategy JSON file.
- Tracing trade-event processing can help diagnose missing or unexpected position data.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.