Environment
python 3.10
Alpaca SDK Version
alpaca-trade-api 2.3.0
Problem
Hi,
After every trading day, I take a look at my daily profit/loss. For this, I check calculate this value from 2 sources:
-
From all of today’s activities, by calculating how much I bought and sold. I retrieve today’s activities with: .get_activities(activity_types=‘FILL’, date=date_today)
-
My equity at the beginning and at the end of the day. I retrieve this with: .get_account().equity
For a long time now, I have encountered a mismatch between 1) and 2). What’s more, when I look at the dashboard on the website, it matches what I get from 2), but it also changes wildly after hours and overnight, when I make no trades and hold no positions (I close all my positions every day).
Could someone please explain to me what is going on? Is it something that I am doing, or is this a bug in the website?
Which results should I trust?
Does this happen in live trading? I don’t feel comfortable trading real money until fundamental yet straightforward issues like my daily profit/loss are working smoothly.
Thank you
Paper or Live Trading?
Paper