In my previous post, I discussed how calculating the value of a transaction from different prices can be inaccurate. After much thought, I decided to switch to calculating from transactions as the only way to ensure accuracy. To do this, I used Python to write a program that would perform the calculations. However, I encountered some challenges due to certain methods not making sense. Firstly, I had to determine whether the transaction was a buy or a sell. If it was a sell, then I had to check all the previous buy transactions to determine the correct value. The priority was given to the buy price that was closest to the sell price (and positive when close). However, this approach had a bug problem and was not ideal. For instance, if I bought at prices 10, 12, 13, and 14 and sold at 14.1, my ideal system would sell from buy price 13. However, my program would sell at buy price 14 (including fees) as it was still positive. To fix this issue, I tried adding an x value to fix the buy and ...
This is a major setback for my portfolio. I've been trading for a long time and have developed good relationships in the field. I love this portfolio, and it feels like a heartbreak. The issue lies with the large lot size. I haven't closed it; I've just been waiting for it to rebound as I have in the past. However, this situation is different because the lot size is bigger than ever, and the main direction of the trade cannot recover from the opposite side.
Comments
Post a Comment