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

Refactor/asset stock market index #107

Merged
merged 9 commits into from
Jul 19, 2023

Conversation

fmilthaler
Copy link
Owner

Refactoring the code:
Instead of having almost identical classes for Stock and Market, we now introduce a parent class Asset for both.

- Asset: parent class of stock
- Stock: child of Asset, specific class for a stock within a portfolio
- Market: child of Asset, specific class for a market index

This commit renames market.py to asset.py and makes modifications in stock.py.
What is missing is the new class/module for Market and modification in asset.py
@fmilthaler
Copy link
Owner Author

@PietropaoloFrisoni Let me know what you think about the new structure. Any feedback is welcome. This is not urgent, so look at it whenever you have time.

Copy link
Collaborator

@PietropaoloFrisoni PietropaoloFrisoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! I just have a simple proposal, which I left as a comment in the stock.py file.

Best

finquant/stock.py Show resolved Hide resolved
@PietropaoloFrisoni PietropaoloFrisoni merged commit 184c014 into master Jul 19, 2023
@PietropaoloFrisoni PietropaoloFrisoni deleted the refactor/asset-stock-market-index branch July 19, 2023 05:35
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.

2 participants