FinRL icon indicating copy to clipboard operation
FinRL copied to clipboard

Which weights are useful for optimisation?

Open pbrown74 opened this issue 2 years ago • 0 comments

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.

pbrown74 avatar Mar 19 '22 14:03 pbrown74