Closed gmgreg closed 3 years ago
You are right that currently all the implemented allocation layers are long only.
I guess the simplest way to allow for short positions is to drop the w_i > 0
constraints in NumericalMarkowitz
- this would require slightly modifying the source code around this line.
In general, you can write your own nn.Module
that takes in some input tensor x
and spits out the weight allocation over all assets. As long as the weights sum up to one, all the deepdow
machinery should work.
I am going to close this issue because of inactivity. Feel free to reopen!
Looking at the allocation layer documentation and not seeing how to handle short positions. E.g. if one was looking to create a market neutral portfolio equal weighted with long and short how might this be modeled?