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 am using your current Portfolio Allocation notebook and trying to apply various optimisation algorithms on top. Specifically I am looking at the A2C model.
I am doing the following code to get the set of policy weights from the model. I shock these weights and set them back on the model according to an optimisation algorithm, at the end I run your backtest and compare to a benchmark.
What I am finding is that this set of weights is very large. Is it the correct set of weights that I should be looking at to optimise trading using the model?
def filter_policy_params(model):
return dict(
(key, value)
for key, value in model.policy.state_dict().items()
if ("policy" in key or "shared_net" in key or "action" in key)
)
I was doing this successfully with your old Stock Trading notebook, but in the Portfolio Allocation notebook there are many more weights due to the covariance matrix applied. So I wonder if I am looking at the correct set of weights.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am using your current Portfolio Allocation notebook and trying to apply various optimisation algorithms on top. Specifically I am looking at the A2C model.
I am doing the following code to get the set of policy weights from the model. I shock these weights and set them back on the model according to an optimisation algorithm, at the end I run your backtest and compare to a benchmark.
What I am finding is that this set of weights is very large. Is it the correct set of weights that I should be looking at to optimise trading using the model?
def filter_policy_params(model):
return dict(
(key, value)
for key, value in model.policy.state_dict().items()
if ("policy" in key or "shared_net" in key or "action" in key)
)
I was doing this successfully with your old Stock Trading notebook, but in the Portfolio Allocation notebook there are many more weights due to the covariance matrix applied. So I wonder if I am looking at the correct set of weights.
Any pointers gratefully received.
Beta Was this translation helpful? Give feedback.
All reactions