Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a MonthlyLiquidateRebalanceStrategy class along with appropriat… #144

Merged
merged 2 commits into from
Oct 14, 2016

Conversation

mhallsmoore
Copy link
Owner

…e PositionSizer subclass to allow monthly rebalancing for long portfolios.

…e PositionSizer subclass to allow monthly rebalancing for long portfolios.
@coveralls
Copy link

coveralls commented Oct 13, 2016

Coverage Status

Coverage decreased (-2.4%) to 70.196% when pulling 97c4c1c on mhm_price_lock into 325266d on master.

@ryankennedyio
Copy link
Contributor

ryankennedyio commented Oct 14, 2016

Looks nice Mike.

How could we consider allowing people to include some modern portfolio theory (for example), where a user may want to adjust the position weights dynamically according to asset correlations across the portfolio? That's an interesting problem because it encompasses a lot of the system (risk, sizing, correlations & some factor in the strategy for 'inclusion' in the basket).

If we can at least think about how one might build that nicely, it would be a good proof that the current architecture is, at least, pretty decent. Just thinking about that, there is some conceptual overlap between position_sizer and risk_manager, the lines between them can be a bit blurry.

@mhallsmoore mhallsmoore merged commit ee75ec6 into master Oct 14, 2016
@mhallsmoore
Copy link
Owner Author

@ryankennedyio - This is certainly tricky!

As it stands the SuggestedOrder is generated and sent through the PositionSizer and then subsequently the RiskManager.

I agree that the lines are blurry between PositionSizer and RiskManager. For instance calculating the correlations between each asset in the portfolio is something that should really be part of "risk", but those values are needed in order to size positions! Perhaps this motivates combining PositionSizer and RiskManager into a new PositionRiskManager class?

The other issue here is that in this situation (long-style weighted portfolios) it makes the Strategy object rather redundant, beyond selecting which assets to invest in (and even that can be set outside the Strategy), as most of the trading code is handled by the above mentioned manager classes.

Another common example is Risk Parity strategies (as discussed here: http://www.signalplot.com/implement-simple-risk-parity-strategy/), which involve calculating historical vol (standard deviations) of each asset and then using this as weightings. I imagine we'd want to calculate previous N-month std and then adjust weights accordingly. Again, this makes use of Strategy, PositionSizer and RiskManager!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants