@bashatrader would it be wrong of me to assume your disdain for machine learning is the result of a crippling fear of the unknown?
one thing is sure with the proprietary languages, they are able to deliver trading systems with a LOT less verbosity than general purpose languages, since they have plenty of build in functions to simplify the task of trading.Here is some AFL code. I don't know why would anyone want to use anything else, including this strange Python stuff.
Code:SetBacktestMode(backtestRegular); SetTradeDelays ( 1, 1, 1, 1); CondLong = MA(Close, 50) > MA(Close,200) AND Ref(MA(Close, 50) ,-1) <= Ref(MA(Close, 200), -1) ; CondShort= MA(Close, 50) < MA(Close,200) AND Ref(MA(Close, 50) ,-1) >= Ref(MA(Close, 200), -1) ; Buy=Cover=CondLong; Short=sell=CondShort; BuyPrice=ShortPrice=Open; SetPositionSize( 100, spsShares); ApplyStop(0,1,5);
Check this out...Machine learning is multiple comparisons <=> data-mining <=> useless:
@bashatrader would it be wrong of me to assume your disdain for machine learning is the result of a crippling fear of the unknown?
Why are people so adversarial on this website? Sometimes people make mistakes, but its not like anyone is knowingly misleading others or anything malicious. We're (mostly) here with the objective of participating in a community of traders for educational purposes. Not a personal condemnation @M.ST. , I'm just saying this site has a pervasive attitude of hostility that a) I don't understand b) I feel often detracts from both learning and answering the original question.
Machine learning is multiple comparisons <=> data-mining <=> useless:
http://en.wikipedia.org/wiki/Multiple_comparisons_problem
There is no way in the world that any such procedure will generate a profitable system. But I cannot see the reason for all these buzzwords:
SVM
radial basis function
data wrangling
categories for the classification
perform the data split into train
Monte Carlo analyses
system health
None of the above will make any money, try as much as you want you get nowhere. The OP asked a specific question. Here is some AFL code. I don't know why would anyone want to use anything else, including this strange Python stuff.
Code:SetBacktestMode(backtestRegular); SetTradeDelays ( 1, 1, 1, 1); CondLong = MA(Close, 50) > MA(Close,200) AND Ref(MA(Close, 50) ,-1) <= Ref(MA(Close, 200), -1) ; CondShort= MA(Close, 50) < MA(Close,200) AND Ref(MA(Close, 50) ,-1) >= Ref(MA(Close, 200), -1) ; Buy=Cover=CondLong; Short=sell=CondShort; BuyPrice=ShortPrice=Open; SetPositionSize( 100, spsShares); ApplyStop(0,1,5);
SetBacktestMode( backtestRegular );
SetTradeDelays ( 1, 1, 1, 1 );
SetOption( "ActivateStopsImmediately", True );
SetPositionSize( 100, spsShares );
MA1 = MA( C, 50 );
MA2 = MA( C, 200 );
Buy = Cover = Cross( MA1, MA2 );
Short = Sell = Cross( MA2, MA1 );
BuyPrice = ShortPrice = Open;
ApplyStop( stopTypeLoss, stopModePercent, amount = 5, exitatstop = 1, volatile = False, reentrydelay = 0 );