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
I made a PR with a small refactor to two of the examples. #87
I have some questions / thoughts:
for multiperiod_tcost.py
why is there a hard-coded zero-out of the portfolio on 4/20/23? Should the backtester have an end_time of 4/20/23 then?
if you set an initial h, initial_value becomes unnecessary / overridden, it may be worth noting this in the docs
drawdowns are positive numbers - it's more conventional to plot them as negative (e.g., underwater). I'd actually suggest flipping the sign of the drawdowns series when it's calculated.
hello_world.py - I didn't refactor this as it seems really expensive for a "hello world" - making 500 yfinance calls / filling one's hard drive with data. Suggest paring down to perhaps the example in the readme?
The text was updated successfully, but these errors were encountered:
Ok you're right, I was experimenting with the examples when working on the covariance forecast, it scales nicely to hundreds of names. (The data doesn't take much space BTW, each stock takes 500k-1Mb, so less than 300Mb in total). The multiperiod example shows the effect of imposing constraints at time (if you know ahead of time that you have to be all cash on a given day, it plans and optimizes on tcost). This also showcases some new api elements (it wasn't possible in 0.0.X, now the policies in backtest are aware of the trading calendar). If you want you could also help me translate the old examples (in https://github.com/cvxgrp/cvxportfolio/tree/0.0.X ) for the new API. They should become much more terse, one of my goals has been to move logic that was built there into the library itself.
I made a PR with a small refactor to two of the examples.
#87
I have some questions / thoughts:
multiperiod_tcost.py
end_time
of 4/20/23 then?h
,initial_value
becomes unnecessary / overridden, it may be worth noting this in the docshello_world.py
- I didn't refactor this as it seems really expensive for a "hello world" - making 500 yfinance calls / filling one's hard drive with data. Suggest paring down to perhaps the example in the readme?The text was updated successfully, but these errors were encountered: