Back to Community
Constraint based Unsupervised Learning in Python to figure out Most Profitable Trading Strategy? Is it possible?

Hello all,

I am totally new to Machine Learning as well as Python. I am trading markets since 3 years and now trying to understand Algo Trading & ML based approach to trading. Please forgive me if I ask naive questions and correct me if you spot a flaw in my understanding.

I have an intuition in my mind about ML and I want to clear it out from your help. We all know, Profitable trading depends on following things.

Risk : Reward Ratio || Winning Rate || Position Size) || Frequency of Trades

What we want to achieve = Maximize P

Constraints { Margin = 1000000, X<=7}
P = (WinTrades*ProfitPerTrade*PositionSize) - (LossTrades*LossPerTrade*PositionSize) #NetProfits
WinTrades = Number of Trades where we made profit(Sell-Buy)
LossTrades = Number of Trades where we lost money(Sell-Buy)
ProfitPerTrade = (TotalProfits/WinTrades)
LossPerTrade = (TotalLoss/LossTrades)
Margin = 100000
RiskPerTrade = (Margin*X%) #X% means Optimum Position Size
StopLoss = SL
PositionSize = (StopLoss/RiskPerTrade)

Buy = Let the ML Algo decide the best case condition
Sell = Let the ML Algo deide the best case condition

If we just define our constraints and let the algo run, then is it possible to get Buy & Sell Signals based on that maximising Profits?

If we get such buy & sell signals than we can clusterize them to find most profitable trading strategy?

Please share your views.