fmilthaler / FinQuant

A program for financial portfolio management, analysis and optimisation.
MIT License
1.38k stars 190 forks source link

Moving stock class #80

Closed PietropaoloFrisoni closed 1 year ago

PietropaoloFrisoni commented 1 year ago

The docstrings are updated to reflect the changes.

fmilthaler commented 1 year ago

Thanks for that as well. Fully agree that Stock should be removed from portfolio.py. As part of that, please also move the test test_Stock() in its own test file tests/test_stock.py.

PietropaoloFrisoni commented 1 year ago

I moved the test into a separate file as well. I maintained some of the global variables (even if not all of them are used in _testStock) in case in the future one wants to add a few more stock tests.

Since I still do not have my quandl API key, I performed the test using yfinance but I changed back to quandl before the commit. Obviously, it should work with quandl as well.