You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current code provides an option to forward fill prices as an alternative when the forward price can't be inferred from the current priced contract. A potentially more accurate alternative may be to "roll-back" to the latest point where both forward and current contract prices are available.
The text was updated successfully, but these errors were encountered:
vishalg
changed the title
Alternative strategy for rolling when forward price can't be inferred
Rolling contracts fails when trying to infer forward price
Nov 16, 2024
Working through this issue, I have realised that this is because DataFrame.append method has been deprecated in pandas. The code already "rolls-back" to the latest date where matching prices are observed
vishalg
pushed a commit
to vishalg/pysystemtrade
that referenced
this issue
Nov 16, 2024
Replaced DataFrame.append with DataFrame.concat, a df.empty check is not required but avoids the FutureWarning about dtype of an empty DataFrame in concat
The current code provides an option to forward fill prices as an alternative when the forward price can't be inferred from the current priced contract. A potentially more accurate alternative may be to "roll-back" to the latest point where both forward and current contract prices are available.
The text was updated successfully, but these errors were encountered: