wsyxbcl / Reimu

Source code for @hakurei_bot on telegram.
MIT License
5 stars 1 forks source link

Mocking real positions and calculating the corresponding return rate #20

Open ForstMaple opened 3 years ago

ForstMaple commented 3 years ago

The current portfolio assumes that all assets maintain the same proportions/weights unless changed manually. This is more like the stock indices in the real market. To mock real positions, i.e., assuming that all assets maintain the same amount unless changed manually, we need to keep each asset's market value up to date and calculate the return rate accordingly.

This function is pending further research.

ForstMaple commented 3 years ago

Should consider: “cash" in a portfolio attaching a "cost" attribute to the stock in a portfolio changing positions with the net value inherited