pmorissette / ffn

ffn - a financial function library for Python
pmorissette.github.io/ffn
MIT License
1.96k stars 294 forks source link

ffn.core.calc_erc_weights: Define lookback period for risk weights #65

Open liquidrates opened 5 years ago

liquidrates commented 5 years ago

is maximum_iterations the look back period for defining risk weights? default of 100 equal to last 100 days?

ffn.core.calc_erc_weights(returns, initial_weights=None, risk_weights=None, covar_method='ledoit-wolf', risk_parity_method='ccd', maximum_iterations=100, tolerance=1e-08)

mirca commented 4 years ago

@liquidrates maximum_iterations has nothing to do with the look back period. It is just the max. number of iterations for the coordinate descent algorithm to compute the ERC weights.

FinQuest commented 4 years ago

@liquidrates the function uses all the returns to calculate the covar. You could truncate the input if required returns.tail(100).