Different currency support#27
Conversation
| dividend REAL DEFAULT 0.0, | ||
| ex_dividend_date DATE, | ||
| pe_ratio REAL, | ||
| currency TEXT DEFAULT 'USD', |
There was a problem hiding this comment.
I'm not sure this is the best place for currency. This is the Symbol table for a ticker like MSFT.
In the current schema, I think each individual thing being tracked (an option, long_position, option, or dividend can be in a specific currency. The default currency for the account can be in preferences.
This assumes 1 account can have trades in more than 1 currency.
There was a problem hiding this comment.
This assumes 1 account can have trades in more than 1 currency
Yes, that was the idea. My account is in EUR. I trade stocks in EUR and USD.
I put the currency in the symbol table because once a symbol (MSFT) is in a currency, all you can do with it is in that currency. So if MSFT is in USD (it is), stocks, dividends and options are all expressed in USD.
On the other hand I also have VOW, which trades in EUR. All you can do with it is in that currency. Dividends, buy/sells and options are all expressed in EUR.
So I think it doesn't make sense to put the currency in each movement, if all the movements for that stock will be in the same currency, right?
There was a problem hiding this comment.
@markturansky Did you have the time to give a thought to this?
I think it doesn't make sense to add the currency to all the tables, when you can only add it to the symbol table and have it applied to all the other entities automatically.
There was a problem hiding this comment.
Thanks for the follow-up.
Yes, I think your argument makes sense. It's part of the metadata of the symbol. Another example might be Exchange.
|
@ktecho would you mind rebasing? I merged a few fixes and improvements, such as improvements to make including |
|
this is Claude's review. It's correct about needing to address the schema change via the new migration system. It has other good suggestions, too. WDYT? |
(This is not yet ready)
This adds currency support to Symbols (USD by default), and shows correct info and currency symbol for each position (stock, option, dividend, ...).
We still need to: