highwire-ai / open-robo-advisor

Open Robo-Advisor is a flexible robo-advisor library written in Python. 🤖
https://blog.highwire.ai
BSD 3-Clause "New" or "Revised" License
42 stars 3 forks source link

Support multiple currencies #4

Open criccomini opened 2 years ago

criccomini commented 2 years ago

Need a way to signify a price when converting between asset symbols.

criccomini commented 2 years ago

I have some concept of Currency asset types now. I don't think they totally work yet, though. Specifically, I think the portfolio.Account deposit and withdraw methods might not set the TransactionLegs properly. I'm using quantity=amount in that code, but I think I might need to use cost when the deposit or withdrawal is not the native currency.

An alternative might be to make non-native currency go through buy/sell rather than deposit/withdraw. I need to poke at this.

criccomini commented 2 years ago

Relevant beancount docs:

https://beancount.github.io/docs/beancount_language_syntax.html#commodities-currencies