given an initial 1000 dollars cash value, and a time series of bid price, ask price, assuming constraints of transaction costs, e.g. 1 dollar every time we buy or sell, what is the best approach to finding buy and sell points that maximize the profit generated by a trading algorithm? (i.e. buy low sell high and/or sell high buy low)
just to be clear, not trying to predict anything here, just looking back at past prices, and trying to figure out what would have been the best course of action given transaction costs constraints
I am thinking of making this a classification problem, with decisions being either of buy/sell/donothing, or an optimization problem, with each variable being a point in time, assigning +1/-1 weight to each, or simply calculating the derivative of the price curve and each time it is zero (changing direction/reverting), then taking position but I am not sure how to have constraints in there, or maybe have a lookback window of the past 100 points, and find the optimal path
