Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rolling contracts fails when trying to infer forward price #1408

Open
vishalg opened this issue Sep 17, 2024 · 1 comment
Open

Rolling contracts fails when trying to infer forward price #1408

vishalg opened this issue Sep 17, 2024 · 1 comment

Comments

@vishalg
Copy link

vishalg commented Sep 17, 2024

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.

@vishalg 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
@vishalg
Copy link
Author

vishalg commented 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant