[R-SIG-Finance] quantstrat luxor.4, timespan optimization
amarjit chandhial
a.chandhial at btinternet.com
Fri Sep 5 20:21:19 CEST 2014
I am trying to get "luxor.4, luxor timespan paramset optimization" running.
In order to to do this:
(a) I run luxor.1, including timespan=.timespan in the 4 rules.
luxor.1 uses an include file which has
.timespans <- c('T06:00/T10:00', 'T07:00/T11:00',
'T08:00/T12:00', 'T09:00/T13:00', 'T10:00/T14:00', 'T11:00/T15:00',
'T12:00/T16:00')
&
I have .timespan = 'T06:00/T10:00'
I then save strategy.
(b) I run luxor.2 paramsets and save strategy.
(c) I run luxor.4, the optimization, whereby I get the following results$tradeStats for the various .timespans:
r$param.combo Portfolio Symbol Num.Txns Num.Trades Net.Trading.PL Avg.Trade.PL Med.Trade.PL Largest.Winner Largest.Loser Gross.Profits Gross.Losses Std.Dev.Trade.PL Percent.Positive Percent.Negative Profit.Factor Avg.Win.Trade
GBPUSD T06:00/T10:00 forex. GBPUSD 6 2 -502 149 149 354 -56 354 -56 289.9138 50 50 6.321429 354
GBPUSD1 T07:00/T11:00 forex. GBPUSD 6 2 -502 149 149 354 -56 354 -56 289.9138 50 50 6.321429 354
GBPUSD2 T08:00/T12:00 forex. GBPUSD 6 2 -502 149 149 354 -56 354 -56 289.9138 50 50 6.321429 354
GBPUSD3 T09:00/T13:00 forex. GBPUSD 6 2 -502 149 149 354 -56 354 -56 289.9138 50 50 6.321429 354
GBPUSD4 T10:00/T14:00 forex. GBPUSD 6 2 -502 149 149 354 -56 354 -56 289.9138 50 50 6.321429 354
GBPUSD5 T11:00/T15:00 forex. GBPUSD 6 2 -502 149 149 354 -56 354 -56 289.9138 50 50 6.321429 354
GBPUSD6 T12:00/T16:00 forex. GBPUSD 6 2 -502 149 149 354 -56 354 -56 289.9138 50 50 6.321429 354
Med.Win.Trade Avg.Losing.Trade Med.Losing.Trade Avg.Daily.PL Med.Daily.PL Std.Dev.Daily.PL Ann.Sharpe Max.Drawdown Profit.To.Max.Draw Avg.WinLoss.Ratio Med.WinLoss.Ratio Max.Equity Min.Equity End.Equity
GBPUSD 354 -56 -56 149 149 289.9138 8.158638 -1712 -0.2932243 6.321429 6.321429 1040 -1000 -502
GBPUSD1 354 -56 -56 149 149 289.9138 8.158638 -1712 -0.2932243 6.321429 6.321429 1040 -1000 -502
GBPUSD2 354 -56 -56 149 149 289.9138 8.158638 -1712 -0.2932243 6.321429 6.321429 1040 -1000 -502
GBPUSD3 354 -56 -56 149 149 289.9138 8.158638 -1712 -0.2932243 6.321429 6.321429 1040 -1000 -502
GBPUSD4 354 -56 -56 149 149 289.9138 8.158638 -1712 -0.2932243 6.321429 6.321429 1040 -1000 -502
GBPUSD5 354 -56 -56 149 149 289.9138 8.158638 -1712 -0.2932243 6.321429 6.321429 1040 -1000 -502
GBPUSD6 354 -56 -56 149 149 289.9138 8.158638 -1712 -0.2932243 6.321429 6.321429 1040 -1000 -502
Well, no, as you can see I get *the same* results for the various times in .timespans.
These are the same tradeStats results for the vanilla luxor.1 strategy having put .timespan = 'T06:00/T10:00' in the 4 rules,
So luxor.4 is trying to do an optimization but doesn't get past the .timespan value, to do the .timespans. That is so because if I follow the procedure for a different .timespan including a .timepsan=NULL, the script[s] will do the 'optimization' for that .timespan only, giving the same tradeStats repeated and not do for the remaining times.
Advice/solution appreciated.
As said what I am, and probably lots of others reading this are after is:
A workflow giving
(1) simple vanilla stratgey (an MA or oscillator)
(2) In-sample optimization of parameter(s) of simple strategy, Out-of-sample run
(3) periodic optimization & walk-forward procedure
with the right results.
Amarjit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20140905/49f1c140/attachment.html>
More information about the R-SIG-Finance
mailing list