An algorithm predicts price movement by some certainty and it invests proportional to the confidence level. Predictions range from -1 to +1, -1 meaning sell for a value of
$1 +1 meaning buy for a value of
$1. Then the profit is calculated by multiplying the prediction with the relative price movement of the security traded.
Now assume a transaction cost of 0.6%. How does that change the profit the algorithm makes? For now, we only calculate the transaction cost for one cycle, i.e buy or sell once and the next time step sell or buy again in order to realize the profit.
So to clarify. I have two variables
pred which is a prediction ranging from -1 and +1. I also have
d_price which is the relative price movement of the security. This can be 0.0003 or -0.002 or something similar. You calculate this by
d_price = (price_t1 - price_t0) / price_t0
I have this eqution now:
profit = pred * d_price
The algorithm makes two trades. It makes a trade when it makes the prediction at time step
t0, then it makes another trade at time step
t1 in order to realize a profit. So if it predicts +0.5 and then the relative price movement is +0.01 then the profit it makes is 0.005.
What I'm asking about is how this changes when there is a transaction cost of
trans=0.006. The transaction cost if percentage based, meaning if I buy 1 amount, I will receive 0.994 only. Likewise, if I sell 1 amount I will receive price * 0.994
profit = f(pred,d_price,trans)