36 lines
402 B
Markdown
36 lines
402 B
Markdown
Quick attempt at an optimal portfolio balancer.
|
|
|
|
Note that it is not currently optimal (Work in progress)
|
|
|
|
## To run:
|
|
```
|
|
yarn
|
|
cat test - | node .
|
|
```
|
|
|
|
## Commands:
|
|
`
|
|
<TICKER>:<price>
|
|
`
|
|
Sets the stock price for the given ticker
|
|
|
|
example:
|
|
```
|
|
AAPL:152.3
|
|
```
|
|
|
|
`
|
|
rebalance:<account_id>
|
|
`
|
|
Triggers a rebalance for the given account ID
|
|
|
|
example:
|
|
```
|
|
rebalance:1
|
|
```
|
|
note: Account 1 is there by default.
|
|
|
|
|
|
|
|
|