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

Implement slippage for sub-daily resolutions #46

Open
TristanFecteau opened this issue Jul 28, 2021 · 2 comments
Open

Implement slippage for sub-daily resolutions #46

TristanFecteau opened this issue Jul 28, 2021 · 2 comments
Labels
task Regular piece of work
Milestone

Comments

@TristanFecteau
Copy link
Contributor

TristanFecteau commented Jul 28, 2021

We currently only support slippage for strategies with a DAILY resolution.
This is because slippage needs to get the daily high price to calculate the total slippage. For daily resolutions, we use fmp's historical-price-full endpoint wich takes into consideration split and dividend where as we take the historical-chart endpoint for sub-daily resolutions and this endpoint does not take into consideration split and dividend. This makes the daily high price not correlate with the hourly/minute prices. If you want an example of this :
https://financialmodelingprep.com/api/v4/historical-chart/AAPL/1hour?from=2019-03-05&to=2019-03-05&apikey=YOUR_API_KEY
https://financialmodelingprep.com/api/v4/historical-price-full/AAPL?from=2019-03-05&to=2019-03-05&apikey=YOUR_API_KEY

Things to do :
-Buy a paying subscription ( starter would do)
-Change the sub daily endpoint for historical-price-adjusted
-Raise an error if the api_key is free and the strategy is sub daily (fmp will return an error : Special Endpoint : this endpoint is only for premium members)
-Remove the comments in portfolio._get_daily_high_price and remove the if that only caluclates slippage if Resolution is DAILY in _get_daily_high_price

@TristanFecteau TristanFecteau added the task Regular piece of work label Jul 28, 2021
@TristanFecteau TristanFecteau added this to the MVP 2 milestone Jul 28, 2021
@TristanFecteau TristanFecteau self-assigned this Jul 28, 2021
@TristanFecteau TristanFecteau changed the title Implement slippage for resolutions other than DAILY Implement slippage for sub daily resolutions Jul 28, 2021
@TristanFecteau TristanFecteau changed the title Implement slippage for sub daily resolutions Implement slippage for sub-daily resolutions Jul 28, 2021
@TristanFecteau
Copy link
Contributor Author

@SamiMammouche would be nice to find a get address where we put our api_key and receive the subscription plan for that key (Kinda like we do for the remaining fmp calls). Would make this issue 10 times easier.

@TristanFecteau
Copy link
Contributor Author

Only export number of calls if free subscription to FMP

@TristanFecteau TristanFecteau self-assigned this Jan 30, 2022
@TristanFecteau TristanFecteau removed their assignment Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task Regular piece of work
Projects
None yet
Development

No branches or pull requests

1 participant