To run the service use yarn start
To run the tests use yarn test
-
Creating three models : Stocks, Trades and Holdings
-
To return a portfolio All trades from trade model will be returned. All holdings from holding model will be returned.
-
Not keeping holdings and trades together in a Portfolio model. Because that will make each trade a sub-document. And it will be difficult to delete individual trades.
Config is kept in the config.js file.
For cumulative returns to work, the stock symbols used must match Yahoo Finance stock symbols.
Adding an API to add stocks or list stocks