Open
Description
- Users may want to create charts using spreads between different securities
- A spread is calculated by subtracting or dividing the price of two specified securities and charting the result
- There may be some interaction with Support Basket Charting #60
- One possible implementation for both issues is to support charting by parsing arbitrary mathematical expressions. Some examples:
-
- TSLA + 2NIO + 5NKLA
-
- TSLA / QQQ
- Basket support can be included by providing weighting functions for the expression:
-
- PRICERATIO(SYMBOL, BASKET) returns the price weighting for the specified symbol against the specified basket
-
- CAPRATIO(SYMBOL, BASKET) returns the market cap weighting for the specified symbol against the specified basket
- For example, if we define a basket #EV that contains symbols [TSLA, NIO, NKLA], and we want to generate a price weighted basket chart for these symbols: PRICERATIO(TSLA, #EV)*TSLA + PRICERATIO(NIO, #EV) * NIO + PRICERATIO(NKLA, #EV) * NKLA
Metadata
Metadata
Assignees
Labels
No labels