Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Maintaining Cash Balances in a few currencies

Hello,
I have looked at previous discussions and could not find a similar question.
What is the best way to implement the following:
An account with base currency = USD. Cash Balance = 100$
Execute a trade to buy 50 Euros. Let’s assume an exchange rate of 1.1; Account Status:
Euro Cash Balance = 50€
USD Cash Balance = 45$ (50*1.1 = 55$)
Execute a trade to buy 5 shares (NOKIA.HE) in Euros. Share price = 5€; Account Status:
Euro Cash Balance = 25€
USD Cash Balance = 45$ 
5 NOKIA.HE = 25€
Many thanks in advance,
Barak

Comments

  • Hi Barak,

    There are 2 ways to track what you want:
    1. Create 2 separate accounts, example Accnt1-USD and Accnt1-EUR and then all USD transactions (cash, symbols) would go into Accnt1-USD and all EUR transactions (Cash, symbols) would go into Accnt1-EUR. When you exchange currency, you would withdraw it from Accnt1-USD and deposit into Accnt1-EUR. When using column(s) ExchRateRtp*Override, you would be able to specify exact exchange rates for each transactions. This would be probably the preferred way to do what you want.
    2. PS (Portfolio Slicer) assumes that cash in account is in currency of account (specified in Account table). But you could create another symbol, example CashEUR, specify it with currency as EUR and in psConfig.txt in area add this symbol with static price of 1: "CashEUR,,,1". This way in your USD account you could buy symbol "CashEUR" and then when you want to buy another symbol in EUR (Nokia), then you would sell CashEUR and buy Nokia. Again, by using columns(s) ExchRateRtp*Override, you can specify exact exchange rates for transactions as your sell CashEUR and buy Nokia transactions would have to have exactly same exchange rates.

    I hope this helps!

  • Hi Vidas,

    Thanks for the quick turnaround on this. I will try both approaches and see which one works better for me.
    Are you considering creating a new type of transaction for currency exchange?
  • At this point, I am not considering adding another transaction type for currency exchange. Primary this is because each transaction is assumed to be in the currency of account. Having currency exchange transaction would require having an additional column in transaction table that would specify the currency. For future major release I might look into option adding transaction currency, but currently, I am not sure if benefit would outweigh possible confusion. But I will have this issue in mind when I am enhancing PS - thanks for suggestions!
Sign In or Register to comment.