-
Notifications
You must be signed in to change notification settings - Fork 147
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
Minimum Profit Optimization #19
Conversation
Description Implementations in this module are based on the following paper: Lin, Y.-X., McCrae, M., and Gulati, C. (2006). Loss protection in pairs trading through minimum profit bounds: A cointegration approach.Journal of Applied Mathematics and Decision Sciences, 2006(1):1–14. Puspaningrum, H., Lin, Y.-X., and Gulati, C. M. (2010). Finding the optimal pre-set boundaries for pairs trading strategy based on cointegration technique. Journal of Statistical Theory and Practice, 4(3):391–419. Implemented features are: Simulate AR(1) processes in batch Simulate cointegrated time series pairs in batch Calculate cointegration coefficient based on either Engle-Granger or Johansen test Fit the AR(1) coefficient of cointegration error Calculate optimal preset upper-bound and minimal total profit for cointegrated pairs trading strategy Trade the strategy based on the optimal parameters Dependency: mlfinlab.statistical_arbitrage Type of change New feature (non-breaking change which adds functionality) This change requires a documentation update How Has This Been Tested? This unit tests file was created to test the added functions: test\test_minimum_profit.py Test Configuration: Windows 10 PyCharm Checklist: My code follows the style guidelines of this project I have performed a self-review of my own code I have commented my code, particularly in hard-to-understand areas I have made corresponding changes to the documentation My changes generate no new warnings I have added tests that prove my fix is effective or that my feature works New and existing unit tests pass locally with my changes Any dependent changes have been merged and published in downstream modules
… caused the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I see that the file structure should be changed in this PR.
Will first fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code quality has improved greatly! 👍
Left a few comments for now.
Will get back to review after the stand-up call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finished the initial review.
Really like the unit tests. Great work! 🙂
Will help a bit with small code fixes.
arbitragelab/cointegration_approach/minimum_profit_simulation.py
Outdated
Show resolved
Hide resolved
arbitragelab/cointegration_approach/minimum_profit_simulation.py
Outdated
Show resolved
Hide resolved
arbitragelab/cointegration_approach/minimum_profit_simulation.py
Outdated
Show resolved
Hide resolved
…/arbitragelab into minimum_profit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The theoretical part of the docs is good. We might want to add a bit more details on the trading process, optimization steps, and how the MTP behaves on the empirical data (sent you a pdf with notes).
I'm still looking for a way to remove the Return type
section in the new sphinx docs.
Added trading simulation class. Added tqdm progress bar for optimization. Added plot function for cointegration simulation. Changed name for simulation class.
…/arbitragelab into minimum_profit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on improving the build times for this PR! Approving it. 👍
Made small changes to docs and code.
Ready for review @Jackal08.
@Stochastic-Adventure Also, please remember to update the changelog. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Fix all license link
- You need to update the changelog
Description
Implementations in this module are based on the following papers:
Implemented features are:
Dependency:
Type of change
How Has This Been Tested?
This unit tests file was created to test the added functions:
Test Configuration:
Checklist: