3. EL CUENTO COMO RECURSO DIDÁCTICO: “NEGRO Y EL CUERVO”
3.1 CONTEXTUALIZACIÓN
13.3 Genetic Programming Market Efficiency Tests 98
Samplergprbh∆rSORgpSORbh∆SOR PanelA:Transactioncosts0.1% 97−99/00−02−0.163545−0.2831630.119618−0.504142−0.8837160.379574 98−00/01−03−0.154462−0.1544620.000000−0.456285−0.4562850.000000 99−01/02−040.110089−0.0653710.1754610.337941−0.2092920.547233 00−02/03−050.0218800.184300−0.1624200.0000000.837831−0.837831 01−03/04−060.0209800.164565−0.1435850.1100691.032769−0.922701 02−04/05−070.1237350.209726−0.0859910.7484161.342923−0.594507 PanelB:Transactioncosts0.25% 97−99/00−02−0.302597−0.284163−0.018434−0.937119−0.886619−0.050500 98−00/01−03−0.169237−0.155462−0.013775−0.499808−0.459239−0.040569 99−01/02−04−0.155800−0.066371−0.089428−0.462051−0.212772−0.249279 00−02/03−05−0.0134330.183300−0.196733−0.0362560.832964−0.869220 01−03/04−060.1429120.163565−0.0206530.8836751.026303−0.142627 02−04/05−070.1543090.208726−0.0544170.9246671.336389−0.411723 PanelC:Transactioncosts0.5% 97−99/00−02−0.286680−0.285830−0.000850−0.897285−0.891429−0.005856 98−00/01−03−0.183772−0.157129−0.026643−0.542428−0.464755−0.077673 99−01/02−04−0.010501−0.0680380.057537−0.033201−0.2181090.184907 00−02/03−05−0.0144790.181634−0.196112−0.0335320.824735−0.858267 01−03/04−060.0769260.161898−0.0849720.4712281.016902−0.545674 02−04/05−070.1512250.207059−0.0558350.9306451.327311−0.396666 Table13.5b:3-yearstrainingand3-yearssout-of-sampleDAXresults.“Sample”denotesthelengthoftraining andsubsequentout-of-sampleperiod.rgpandrbhdenotetheannualizedout-of-samplereturnsfor theGPtradingruleandbuy-and-hold,respectively.∆risthedifferencebetweenthem.SORgp andSORbhindicatetherepectiveannualizedSortinoratiosfortheGPtradingruleandbuy-and- hold,∆SORmeasuresthedifferencebetweenthetwoandisequalto∆SORinthepreceding table.
13.3 Genetic Programming Market Efficiency Tests 99
SampleExcess∆SOR#TNbNsσbσs¯rb¯rs(¯rb−¯rs)(¯rb−¯rm) PanelA:Transactioncosts0.1% 97−01/020.2893210.7129263176760.0262350.022874−0.001687−0.0037290.0020430.000616 98−02/03−0.166092−0.42729541041480.0128940.0228080.0006700.001181−0.000511−0.000300 99−03/04−0.145091−0.7903534159970.0109960.007673−0.0005630.001516−0.002079−0.000788 00−04/05−0.100827−0.72999711441120.0070200.0083960.0008400.000985−0.000145−0.000063 01−05/06−0.011856−0.073692125130.0097560.0066230.0007130.004046−0.003333−0.000039 02−06/07−0.141600−1.150162122490.0006460.0098000.0040230.0007250.0032980.003272 PanelB:Transactioncosts0.25% 97−01/020.2914170.84187015154980.0289480.018006−0.001504−0.0035580.0020540.000799 98−02/03−0.0244800.26952111401120.0136280.0246990.0014880.0003230.0011650.000518 99−03/04−0.062704−0.3660269196600.0104840.0077870.0001520.000460−0.000308−0.000072 00−04/05−0.204957−1.752057002560.0000000.0076370.0000000.000903−0.000903−0.000903 01−05/06−0.159469−0.918730142500.0112500.0097220.0008720.0007500.0001220.000120 02−06/07−0.128586−0.7475231452060.0094730.0098510.0006270.000778−0.000151−0.000124 PanelC:Transactioncosts0.5% 97−01/020.5466561.2719631991530.0134110.030541−0.000539−0.0034440.0029040.001763 98−02/03−0.224627−0.7239533871650.0127000.0220420.0002730.001338−0.001065−0.000697 99−03/04−0.038918−0.2349821198580.0106670.0067260.0000690.000753−0.000684−0.000155 00−04/05−0.073023−0.5411691188680.0076430.0076710.0008110.001160−0.000349−0.000093 01−05/06−0.101090−0.3742191542000.0068130.0103790.0012680.0006130.0006560.000516 02−06/07−0.145598−0.8675181512000.0091940.0099240.0002390.000882−0.000642−0.000512 Table13.6a:5-yearstrainingand1-yearout-of-sampleDAXresults.“Sample”denotesthetrainingperiodusedfollowedbytheout-of-sampletestingperiod (forexample97-99impliesthattrainingdatafrom1997,1998and1999havebeenusedtoderiveatradingrulewhichisthenappliedout-of-sample todatafrom2000andsoon).“Excess”measuresthefitnessimpliedbyaGPtradingruledefinedasexcessreturnoverabuy-and-holdstrategy duringtheout-of-sampleperiod,i.e.(rgp−rbh).∆SORindicatestheexcessSortinoratiodefinedas(SORgp−SORbh)(bothannualized)over thespecifiedout-of-sampleperiod.#Tindicatesthenumberoftradesexecutedbyatradingruleduringout-of-sampletestingwithNbandNs denotingthenumberofbuy-days(in-the-market)andsell-days(out-of-the-market),respectively.σbandσsindicatethestandarddeviationof returnsduringGP-in-market-daysandGP-out-of-market-days,respectively.¯rband¯rsdenotethemeandailymarketreturnduringGP-in-daysand GP-out-dayswith(¯rb−¯rs)asthedifferencebetweenthetwo.(¯rb−¯rm)measuresthedifferencebetweenmeandailyreturnsduringGP-in-days andbuy-and-hold.
13.3 Genetic Programming Market Efficiency Tests 100
Samplergprbh∆rSORgpSORbh∆SOR PanelA:Transactioncosts0.1% 97−01/02−0.292976−0.5822960.289321−0.757054−1.4699800.712926 98−02/030.0764270.242520−0.1660920.3681080.795403−0.427295 99−03/04−0.0896510.055440−0.145091−0.4648080.325546−0.790353 00−04/050.1284570.229284−0.1008271.0504371.780435−0.729997 01−05/060.1771350.188991−0.0118561.0238301.097522−0.073692 02−06/070.0449350.186534−0.1416000.0000001.150162−1.150162 PanelB:Transactioncosts0.25% 97−01/02−0.293879−0.5852960.291417−0.635684−1.4775540.841870 98−02/030.2150390.239520−0.0244801.0549360.7854150.269521 99−03/04−0.0102640.052440−0.062704−0.0568200.309206−0.366026 00−04/050.0213270.226284−0.2049570.0000001.752057−1.752057 01−05/060.0265220.185991−0.1594690.1659541.084684−0.918730 02−06/070.0549480.183534−0.1285860.3892271.136750−0.747523 PanelC:Transactioncosts0.5% 97−01/02−0.043641−0.5902970.546656−0.218213−1.4901761.271963 98−02/030.0098920.234520−0.2246270.0478800.771833−0.723953 99−03/040.0085220.047440−0.0389180.0457960.280778−0.234982 00−04/050.1482610.221284−0.0730231.1614831.702652−0.541169 01−05/060.0799010.180991−0.1010900.6796231.053842−0.374219 02−06/070.0329360.178534−0.1455980.2426061.110124−0.867518 Table13.6b:5-yearstrainingand1-yearout-of-sampleDAXresults.“Sample”denotesthelength oftrainingandsubsequentout-of-sampleperiod.rgpandrbhdenotetheannualized out-of-samplereturnsfortheGPtradingruleandbuy-and-hold,respectively.∆risthe differencebetweenthem.SORgpandSORbhindicatetherepectiveannualizedSortino ratiosfortheGPtradingruleandbuy-and-hold,∆SORmeasuresthedifferencebetween thetwoandisequalto∆SORintheprecedingtable.
13.3 Genetic Programming Market Efficiency Tests 101
SampleExcess∆SOR#TNbNsσbσs¯rb¯rs(¯rb−¯rs)(¯rb−¯rm) PanelA:Transactioncosts0.1% 97−01/02−030.1765560.24347643911140.0229350.022001−0.000246−0.0014810.0012360.000279 98−02/03−04−0.164647−0.21588751723370.0110350.0170810.0007480.0005540.0001940.000129 99−03/04−05−0.165948−0.56484074111020.0091120.0076000.0003280.001591−0.001263−0.000251 00−04/05−06−0.270765−0.75973711443670.0070200.0093200.0008400.000842−0.000002−0.000001 01−05/06−07−0.011856−0.037997150330.0097560.0066230.0007560.004046−0.003290−0.000020 PanelB:Transactioncosts0.25% 97−01/02−030.2962830.411566213171880.0245230.0192510.000346−0.0019920.0023380.000870 98−02/03−04−0.067249−0.01661611483610.0133630.0160270.0014600.0002750.0011860.000841 99−03/04−05−0.062704−0.2240329453600.0089770.0077870.0005950.0004600.0001350.000016 00−04/05−06−0.375042−1.393211005110.0000000.0087270.0000000.000841−0.000841−0.000841 01−05/06−07−0.159469−0.46159012562500.0097750.0097220.0008000.0007500.0000500.000025 PanelC:Transactioncosts0.5% 97−01/02−030.3610940.61492021423630.0126420.0256010.000468−0.0009130.0013810.000993 98−02/03−04−0.267396−0.5207703954140.0123360.0159100.0003320.000685−0.000353−0.000287 99−03/04−05−0.250639−0.83761243291840.0098180.0067140.0001860.001282−0.001096−0.000393 00−04/05−06−0.242961−0.68033711883230.0076430.0093110.0008110.000859−0.000048−0.000031 01−05/06−07−0.101090−0.24590313062000.0093130.0103790.0008810.0006130.0002690.000106 Table13.7a:5-yearstrainingand2-yearsout-of-sampleDAXresults.“Sample”denotesthetrainingperiodusedfollowedbytheout-of-sampletestingperiod (forexample97-99impliesthattrainingdatafrom1997,1998and1999havebeenusedtoderiveatradingrulewhichisthenappliedout-of-sample todatafrom2000andsoon).“Excess”measuresthefitnessimpliedbyaGPtradingruledefinedasexcessreturnoverabuy-and-holdstrategy duringtheout-of-sampleperiod,i.e.(rgp−rbh).∆SORindicatestheexcessSortinoratiodefinedas(SORgp−SORbh)(bothannualized)over thespecifiedout-of-sampleperiod.#Tindicatesthenumberoftradesexecutedbyatradingruleduringout-of-sampletestingwithNbandNs denotingthenumberofbuy-days(in-the-market)andsell-days(out-of-the-market),respectively.σbandσsindicatethestandarddeviationof returnsduringGP-in-market-daysandGP-out-of-market-days,respectively.¯rband¯rsdenotethemeandailymarketreturnduringGP-in-daysand GP-out-dayswith(¯rb−¯rs)asthedifferencebetweenthetwo.(¯rb−¯rm)measuresthedifferencebetweenmeandailyreturnsduringGP-in-days andbuy-and-hold.
13.3 Genetic Programming Market Efficiency Tests 102
Samplergprbh∆rSORgpSORbh∆SOR PanelA:Transactioncosts0.1% 97−01/02−03−0.045180−0.1334580.088278−0.129894−0.3733700.243476 98−02/03−040.0743370.156661−0.0823240.4138990.629786−0.215887 99−03/04−050.0645360.147509−0.0829740.4016120.966453−0.564840 00−04/05−060.0785970.213980−0.1353820.6439771.403714−0.759737 01−05/06−070.1891770.195105−0.0059281.1272811.165278−0.037997 PanelB:Transactioncosts0.25% 97−01/02−030.013183−0.1349580.1481410.033999−0.3775670.411566 98−02/03−040.1215370.155161−0.0336240.6083400.624956−0.016616 99−03/04−050.1146570.146009−0.0313520.7318080.955840−0.224032 00−04/05−060.0249590.212480−0.1875210.0000001.393211−1.393211 01−05/06−070.1138700.193605−0.0797350.6974091.158998−0.461590 PanelC:Transactioncosts0.5% 97−01/02−030.043089−0.1374580.1805470.229628−0.3852920.614920 98−02/03−040.0189630.152661−0.1336980.0938680.614638−0.520770 99−03/04−050.0181900.143509−0.1253200.1024170.940029−0.837612 00−04/05−060.0884990.209980−0.1214800.6946661.375003−0.680337 01−05/06−070.1405600.191105−0.0505450.9005111.146414−0.245903 Table13.7b:5-yearstrainingand2-yearsout-of-sampleDAXresults.“Sample”denotesthelengthoftraining andsubsequentout-of-sampleperiod.rgpandrbhdenotetheannualizedout-of-samplereturnsfor theGPtradingruleandbuy-and-hold,respectively.∆risthedifferencebetweenthem.SORgp andSORbhindicatetherepectiveannualizedSortinoratiosfortheGPtradingruleandbuy-and- hold,∆SORmeasuresthedifferencebetweenthetwoandisequalto∆SORinthepreceding table.
13.3 Genetic Programming Market Efficiency Tests 103
SampleExcess∆SOR#TNbNsσbσs¯rb¯rs(¯rb−¯rs)(¯rb−¯rm) PanelA:Transactioncosts0.1% 97−01/02−040.1765560.18727346481140.0188700.022001−0.000039−0.0014810.0014420.000216 98−02/03−05−0.295349−0.29243393244420.0093680.0154640.0007310.0007200.0000110.000007 99−03/04−06−0.303883−0.65461095771910.0093620.0083540.0003270.001606−0.001279−0.000318 00−04/05−07−0.432773−0.80405511446190.0070200.0095000.0008400.0008240.0000160.000013 PanelB:Transactioncosts0.25% 97−01/02−040.2962830.316006215741880.0193810.0192510.000314−0.0019920.0023060.000569 98−02/03−05−0.297818−0.37483552195470.0117380.0137840.0010480.0005950.0004540.000324 99−03/04−06−0.084620−0.19398411706620.0092430.0078400.0006460.0006410.0000040.000000 00−04/05−07−0.536703−1.336389007630.0000000.0090800.0000000.000827−0.000827−0.000827 PanelC:Transactioncosts0.5% 97−01/02−040.2443500.28882722874750.0117410.0227730.000040−0.0004330.0004720.000294 98−02/03−05−0.485542−0.7271113956710.0123360.0133540.0003320.000780−0.000448−0.000392 99−03/04−06−0.327565−0.71449454173510.0095820.0085740.0004140.000920−0.000505−0.000231 00−04/05−07−0.404969−0.75901311885750.0076430.0095090.0008110.000833−0.000022−0.000016 Table13.8a:5-yearstrainingand3-yearsout-of-sampleDAXresults.“Sample”denotesthetrainingperiodusedfollowedbytheout-of-sampletestingperiod (forexample97-99impliesthattrainingdatafrom1997,1998and1999havebeenusedtoderiveatradingrulewhichisthenappliedout-of-sample todatafrom2000andsoon).“Excess”measuresthefitnessimpliedbyaGPtradingruledefinedasexcessreturnoverabuy-and-holdstrategy duringtheout-of-sampleperiod,i.e.(rgp−rbh).∆SORindicatestheexcessSortinoratiodefinedas(SORgp−SORbh)(bothannualized)over thespecifiedout-of-sampleperiod.#Tindicatesthenumberoftradesexecutedbyatradingruleduringout-of-sampletestingwithNbandNs denotingthenumberofbuy-days(in-the-market)andsell-days(out-of-the-market),respectively.σbandσsindicatethestandarddeviationof returnsduringGP-in-market-daysandGP-out-of-market-days,respectively.¯rband¯rsdenotethemeandailymarketreturnduringGP-in-daysand GP-out-dayswith(¯rb−¯rs)asthedifferencebetweenthetwo.(¯rb−¯rm)measuresthedifferencebetweenmeandailyreturnsduringGP-in-days andbuy-and-hold.
13.3 Genetic Programming Market Efficiency Tests 104
Samplergprbh∆rSORgpSORbh∆SOR PanelA:Transactioncosts0.1% 97−01/02−04−0.006519−0.0653710.058852−0.022019−0.2092920.187273 98−02/03−050.0858510.184300−0.0984500.5453980.837831−0.292433 99−03/04−060.0632700.164565−0.1012940.3781591.032769−0.654610 00−04/05−070.0654680.209726−0.1442580.5388671.342923−0.804055 PanelB:Transactioncosts0.25% 97−01/02−040.032390−0.0663710.0987610.103234−0.2127720.316006 98−02/03−050.0840280.183300−0.0992730.4581290.832964−0.374835 99−03/04−060.1353580.163565−0.0282070.8323191.026303−0.193984 00−04/05−070.0298250.208726−0.1789010.0000001.336389−1.336389 PanelC:Transactioncosts0.5% 97−01/02−040.013412−0.0680380.0814500.070718−0.2181090.288827 98−02/03−050.0197860.181634−0.1618470.0976230.824735−0.727111 99−03/04−060.0527100.161898−0.1091880.3024071.016902−0.714494 00−04/05−070.0720700.207059−0.1349900.5682991.327311−0.759013 Table13.8b:5-yearstrainingand3-yearsout-of-sampleDAXresults.“Sample”denotesthelengthoftraining andsubsequentout-of-sampleperiod.rgpandrbhdenotetheannualizedout-of-samplereturnsfor theGPtradingruleandbuy-and-hold,respectively.∆risthedifferencebetweenthem.SORgp andSORbhindicatetherepectiveannualizedSortinoratiosfortheGPtradingruleandbuy-and- hold,∆SORmeasuresthedifferencebetweenthetwoandisequalto∆SORinthepreceding table.
13.3 Genetic Programming Market Efficiency Tests 105
1-yearout-of-sample2-yearsout-of-sample3-yearsout-of-sample TradingRuleExcess∆SORExcess∆SORExcess∆SOR 3-yearsin-sample97−99/...c050.0325980.1359170.0058630.011110 99−01/...c050.5930671.4960940.2760500.3869050.1726120.184907 04−06/...c050.0161280.090852 5-yearsin-sample97−01/...c0250.2914170.8418700.2962830.4115660.2962380.316006 98−02/...c025−0.0244800.269521 97−01/...c050.5466561.2719630.3610940.6149200.2443500.288827 Table13.9:BestGeneticProgrammingtradingrulesfortheDAX.
13.3 Genetic Programming Market Efficiency Tests 106
13.3.2 Testing the Hang Seng 13.3.2.1 Test Results
Hang Seng results have been compiled in Tables 13.11a - 13.16a and adopt the already familiar table layout from the DAX scenarios. As already pointed out before, all scenarios under unrealistcally low transaction costs of c = 0.1 will not be addressed in-depth and only serve for comparative statics.
Two GP rules manage to outperform buy-and-hold under c = 0.25 in Table 13.11a. The first rule (97-99/00) is one of the rare instances where GP always stays out-of-the-market. This might reflect the aftermath of the Asian crisis starting in 1997 which coincides with the training period of the GP algorithm98.
Rolling the time window forward by one year results once more in an out-performance compared to buy-and-hold, this time with a real timing strategy.
Interestingly, the strategy starts with a prolonged out-of-the-market position and switches into the market shortly before Sept. 11th99. As this is the only trade the rule executes, it remains in-the-market even after Sept. 11th. Despite the unfortunate timing the rule yields just a small negative absolute return (-0.015305 p.a. see Table 13.11b) vs. a massive -0.270973 p.a. loss for buy-and-hold which at first sight seems puzzling. Some further analysis showed that the market was already down roughly 23% before Sept. 11th so this event did not add up much to the losses already incurred in the Hang Seng100. This explains the surprisingly good performance of the rule despite the, from an intuitive point of view, unfortunate timing101. Furthermore, volatility during buy-days is higher than during sell-days and timing abilities of the rule are insignificant. A replication of buy-and-hold is suggested for the 99-01/02 and 01-03/04 scenarios.
Focusing on the c = 0.5 panel, two rules emerge that beat buy-and-hold on
98The impact of the Asian crisis is easily spotted in Figure 13.2.
99As a general remark, GP investment positions can be easily superimposed on the respective
time series using Matlab, however the author chose not to include these charts in order to save space.
100The heavy losses may be attributed to a massive outbreak of Severe Acute Respiratory
Syn-drome (SARS) also known as bird flu in 2001.
101As a sidenote, it is interesting that the DAX (and most likely all western stock indices) were
far more affected by Sept. 11th than the Hang Seng.
13.3 Genetic Programming Market Efficiency Tests 107
a risk-adjusted basis. The 98-00/01c05 rule repeats the unfortunate timing of the rule discussed above (staying out and then switching in shortly before Sept.
11th) once more but switches out-of-the-market after 51 days rather than stay-ing in until the end of the year. As most of the total loss in 2001 already occurred before Sept. 11th, the rule manages to cut losses considerably (-0.165865 p.a.
vs. -0.275973 p.a., see Table 13.11b). Volatility during buy-days is once more higher than during sell days (0.025094 vs. 0.015039). The 99-01/02c05 rule yields positive results as well. It only takes a single in-the-market position in the mid of the trading year to cut losses considerably (-0.143000 vs. -0.206992 see Table 13.11b). Unfortunately, the difference (¯rb− ¯rs) and (¯rb− ¯rm) are in neither case statistically significant. Leaving aside the c = 0.1 rules, the remain-ing GP rules clearly underperform the benchmark. Similar to the results from the DAX, trading frequencies seems to be quite unaffected by transaction costs.
The impact of transaction costs will become more visible in the later scenarios with a 5-year training horizon.
Stretching the horizon to two years out-of-sample yields similar results (Ta-ble 13.12a). The rules obtained during the 97-99 and 98-00 training sample outperform buy-and-hold in terms of excess return and excess Sortino ratio for both transaction costs scenarios (c = 0.25 and c = 0.5). Interestingly, the same rules execute at most a single trade during the first out-of-sample year (see Table 13.11a) whereas trading activity picks up during the second year. As already observed before, volatility during in-days is higher than during out-days.
Returning to Table 13.12a, some brief remarks on the c = 0.1 rules are in order.
Despite the unrealistically low transaction cost, the algorithm did not find any successful trading rule in scenarios where the c = 0.25 and c = 0.5 rules failed as well to beat buy-and-hold. This might hint at market efficiency for these partic-ular periods in the market since even with extremely low transaction costs (and thus the possibility of almost zero transaction costs), no technical trading rule could be found that beats the benchmark. This applies to both the 3:1 and the 3:2 scenarios illustrated in Tables 13.11a and 13.12a. The 03-05/06(-07) case is an exception that yields positive returns while the same scenario under higher
13.3 Genetic Programming Market Efficiency Tests 108
transaction costs does not. However, as the rule is inexistent under realistic transaction costs, this does not contradict market efficiency. Speaking of the c = 0.1 rules in Table 13.12a, the 02-04/05-06 rule manages to forecast market returns at a statistically significant level (α = 0.05) despite a marginally nega-tive risk-adjusted performance.
As a final observation, it is worth mentioning that neither of the successful rules yields positive absolute returns p.a. (Table 13.12b). The rules rather seem to rely on their power to switch out-of-the-market at the “right time” to cut losses instead. However (¯rb− ¯rm) and (¯rb− ¯rs) are mostly insignificant in the cases discussed so far.
Stretching the out-of-sample horizon further, Table 13.13a is in line with the result discussed so far. Three rules are still successful for c = 0.25 and c = 0.5.
Interestingly, σb is roughly equal to σs for these rules which has not been the case in shorter out-of-sample scenarios.
Extending the training periods to 5 years, things look slightly different (Ta-ble 13.14a). There are only two succesful rules in total, both of them in the c = 0.25 panel. The 97-01/02 rule yields a considerably better Sortino ratio as does the 00-04/05 rule. Both rules execute just a single trade and volatility is almost equal during buy- and sell-days. All other rules fail to beat a buy-and-hold strategy, even the c = 0.1 scenarios. As another observation, the negative correlation between transaction costs and trading frequency can be seen in Ta-ble 13.14a though the effect will become more visiTa-ble later.
The results do not change much for a 2-year out-of-sample horizon (Table 13.15a). The only successful rules are the 99-03/04-05 (which was just buy-and-hold in Table 13.14a) and the 00-04/05-06 rule for c = 0.25 with the latter consisting of just a single trade. Volatility during buy-days is once more slightly higher than during sell-days. Another point is the now clearly negative rela-tionship between transaction costs and trading frequencies.
13.3 Genetic Programming Market Efficiency Tests 109
Stretching the out-of-sample period to 3 years (Table 13.16a) yields two suc-cessful rules. The 97-01/02-04c025 rule comes back into positive territory (it yielded negative returns for 2-years out-of-sample) and the 00-04/05-07c025 rule is still profitable. However, a look at the Sortino ratio shows that outperfor-mance is at most marginal for both rules. The other rule severly underperform the benchmark.
Summarizing the most important results for the Hang Seng, the following points can be made:
• GP-optimized rules largely fail at beating the buy-and-hold benchmark on a risk-adjusted basis...
• but several rules outperform the benchmark during the years 2000-2002 (technology bubble burst, bird flu, Sept. 11th)
• one rule outperforms the benchmark in later years despite a sustained rise in the index (which favours buy-and-hold)
• the rules have no statistically significant forecasting power.
A list of successful trading rules for the Hang Seng has been compiled in Table 13.17. As usual, the c = 0.1 rules will not be addressed further. In general, the power of the GP rules seems to decline over time both in terms of excess returns and excess Sortino ratios. Therefore, as pointed out before in the case of the DAX, a 1-year out-of-sample period seems to work best when using GP.
Concerning the 00-04/...c025 rule, it might seem puzzling as to why the excess return remains the same over all out-of-sample periods. Upon closer inspection of the rule (see Tables 13.14a-13.16a) it turns out that it executes a single deal during the first out-of-sample year and simply stays in-the-market afterwards when the out-of-sample period is extended to up to 3 years. The singular trade in the first year outperforms the benchmark earning 0.053836 and this return is carried throughout the subsequent periods during which the rule simply takes a sustained buy-and-hold position which does not add or subtract anything from the first year returns. Therefore, performance in excess of buy-and-hold remains the same. As already pointed out before, most of the rules (6 out of 8) beat the
13.3 Genetic Programming Market Efficiency Tests 110
market during the years 2000-2002 where the market retreated due to the burst of the dot-com bubble, bird flu in Hong Kong (which probably had the hardest impact on the Hang Seng) and the events of Sept. 11th.
13.3.2.2 Structure of Trading Rules
A set of successful rules for the Hang Seng is illustrated in Figure 13.6. The set is not exhaustive (see Table 13.17) since some rules are quite complex and do not have an easy-to-grasp economic interpretation. First of all, all rules shown have a surprisingly easy structure. A particularly easy rule was obtained during the 97-99c025 in-sample period (Figure 13.6a). The rule simply checks whether the closing price lagged by 200 days is less than the closing price lagged by 250 days102. If this is true, an in-position is taken, else the rules stays out-of-the-market.
The second tree (Figure 13.6b) depicts the rule obtained from the 98-00c025 sample and first checks whether the minimum over the last 150 trading days is less than the closing price 150 days ago and then checks whether the minimum over the last 200 trading days is less than the result from the aforementioned subtree (either 0=false or 1=true). If the rule evaluates as true, an in-the-market position is set up, else the rule stays out-of-the in-the-market. A mirrored version of this rule is shown in Figure 13.6c depicting the rule obtained for the 99-01c05 sample. It first checks whether the maximum over the last 50 trading days is greater than 1.02 and then checks whether the result from the subtree (either 0 or 1) is greater than the 150-day moving average.
Figure 13.6d features the boolean operator “and”. Basically, the “and” opera-tor evaluates as 1=true as long as both arguments related to it are both true.
Therefore, the rule first checks whether the closing price lagged by 200 days is less than the closing price lagged by 100 days. Once more the result from this subtree is either 0=false or 1=true. The rule is in the market only if the
sub-102As a reminder, all price data used in this study have been normalized by dividing the
clos-ing price by its respective 250-day movclos-ing average. All indicators have been derived from normalized prices. Therefore, when speaking of prices, moving averages etc. the respective indicators based on normalized prices rather than the original data is meant.
13.3 Genetic Programming Market Efficiency Tests 111
a)
Lag(t)(200) Lag(t)(250)
<
b)
Min(t)(200)
Min(t)(150) Lag(t)(150)
<
<
c)
Max(t)(50) 1.02
>
MA(t)(150) >
d)
Min(t)(150)
Lag(t)(200) Lag(t)(100)
<
and
Figure 13.6: Tree structure of successful Hang Seng trading rules.
13.3 Genetic Programming Market Efficiency Tests 112
tree yields 1 and the left-hand side min150 is 6= 0, else the rule stays out-of-the market103.
As a final observation, it is noteworthy that the rules illustrated in Figure 13.6 have a tendency to pick up long term indicators (100, 150, 200 and 250 trading days time span) as was the case for the DAX trading rules104. These building blocks might imply that the GP algorithm relies on long-term trends in the mar-ket rather than reacting to short-lived (white) noise. The noticeable presence of long-term indicators in successful trading rules might also imply that tech-nical trading rules should be generally based on long- rather than short-term variables.
13.3.2.3 Long Term Genetic Programming Performance
For the the sake of completeness, equity curves for 3:1 and 5:1 revolving GP strategies in the Hang Seng are illustrated in Figure 13.7. It is easily seen that GP fails to consistently beat the benchmark in all cases except the 3:1c025 sce-nario. However, one has to bear in mind that the Hang Seng showed a strong and sustained upward trend throughout the last couple of years as seen in Fig-ure 13.2 making it very hard for GP to beat buy-and-hold105. Returning to the 3:1c025 scenario in Figure 13.7, it is remarkable how well GP stays above the benchmark. It partly avoids severe losses during the years 2000-2002 and still manages to keep its head above water in the following years. The tide finally turns against GP in 2007 when the benchmark continues to rise in a sustained upward trend with the benchmark overtaking GP. The most important question arising from this picture is of course whether the EMH still holds. To check this, summary statistics for the scenario are provided in Table 13.10.
It is noteworthy that GP (possibly due to some prolonged out-of-the-market periods) results in lower volatility (0.0078 vs. 0.0136) but higher skewness in absolute terms and a way higher excess kurtosis compared to the benchmark.
103The case min150=0 occurs during the first 149 trading days as min150 has not been initialized
yet.
104The same applies to the more complex rules that have not been illustrated in Figure 13.6.
105This is of course a direct consequence of the choice of buy-and-hold as benchmark. A different
benchmark might have resulted in a more favorable outcome for GP.
13.3 Genetic Programming Market Efficiency Tests 113
In terms of total return, GP lacks behind buy-and-hold (0.2846 vs. 0.4498) but most importantly, it is on par with the benchmark in terms of Sortino ratio.
Therefore, it may be concluded that the Hang Seng was overall efficient during the years 2000-2007.
As a last exercise, the related kernel density estimates for the equity curves are shown in Figure 13.8. Three out of four scenarios feature a high spike around zero mirroring prolonged out-of-the-market positions (which tend to gather many tiny positive returns from the money market) and very small GP in-market returns. Only the 3:1c05 scenario spreads out a little more but still finishes well below the benchmark in terms of total return and Sortino Ratio (statistics not shown).
2000 2001 2002 2003 2004 2005 2006 2007
−1.2
2000 2001 2002 2003 2004 2005 2006 2007
−1.2
2002 2003 2004 2005 2006 2007
−1.2
2002 2003 2004 2005 2006 2007
−1.2
Figure 13.7: Equity curves for 3:1 and 5:1 revolving Genetic Programming strategies for the Hang Seng for c=0.25 and c=0.5.
13.3 Genetic Programming Market Efficiency Tests 114
Table 13.10: Hang Seng 3:1 c = 0.25 revolving strategy results.
−0.120 −0.1 −0.08 −0.06 −0.04 −0.02 0 0.02 0.04 0.06 0.08
Figure 13.8: Kernel smoothing density estimates for 3:1 and 5:1 Hang Seng scenarios for c=0.25 and c=0.5.
13.3 Genetic Programming Market Efficiency Tests 115
SampleExcess∆SOR#TNbNsσbσs¯rb¯rs(¯rb−¯rs)(¯rb−¯rm) PanelA:Transactioncosts0.1% 97−99/000.0198130.0799681179670.0201460.018723−0.000758−0.000068−0.000691−0.000188 98−00/010.0511600.2862702151910.0195570.013755−0.001507−0.000421−0.001086−0.000408 99−01/020.0000000.000000124600.0122090.000000−0.0008090.000000−0.0008090.000000 00−02/03−0.263177−1.7235283711760.0116940.0102640.0004170.001507−0.001090−0.000777 01−03/04−0.101171−0.660709002480.0000000.0102770.000000−0.0005770.000577−0.000419 02−04/05−0.015833−0.331433002460.0000000.0072580.0000000.000178−0.000178−0.000178 03−05/06−0.077375−0.5589351211350.0091960.0086510.0009800.002369−0.001389−0.000198 04−06/070.017007−0.1023221145990.0192920.0114980.002063−0.0000080.0020710.000840 PanelB:Transactioncosts0.25% 97−99/000.2027310.446743002460.0000000.0197330.000000−0.0005700.0005700.000570 98−00/010.2556690.9352841921500.0207650.015361−0.000407−0.0015230.0011160.000692 99−01/020.0000000.000000124600.0122130.000000−0.0008010.000000−0.0008010.000000 00−02/03−0.279931−1.896715002470.0000000.0106810.0000000.001193−0.001193−0.001193 01−03/040.0000000.000000124800.0102780.0000000.0004270.0000000.0004270.000000 02−04/05−0.012833−0.305865002460.0000000.0072580.0000000.000178−0.000178−0.000178 03−05/06−0.043383−0.3597421196500.0095420.0072930.0012170.0010230.0001940.000039 04−06/07−0.236797−1.106381112430.0000000.0165690.0202720.0011440.0191280.019049 PanelC:Transactioncosts0.5% 97−99/00−0.017500−0.0207531180660.0202710.018292−0.0009600.000492−0.001452−0.000390 98−00/010.1101080.5907801511910.0249610.015025−0.003656−0.000416−0.003239−0.002557 99−01/020.0639920.3788511631830.0112970.012499−0.002317−0.000279−0.002039−0.001516 00−02/03−0.259144−1.69642511021450.0109890.0104520.0003060.001817−0.001511−0.000887 01−03/04−0.299134−1.82238331301180.0097430.010539−0.0013400.002373−0.003713−0.001766 02−04/05−0.007833−0.263583002460.0000000.0072580.0000000.000178−0.000178−0.000178 03−05/06−0.079027−0.5301413225210.0093240.0063850.0010100.002965−0.001955−0.000167 04−06/07−0.040182−0.2806562146980.0193040.0114320.0017260.0004730.0012530.000503 Table13.11a:3-yearstrainingand1-yearout-of-sampleHangSengresults.“Sample”denotesthetrainingperiodusedfollowedbytheout-of-sampletesting period(forexample97-99impliesthattrainingdatafrom1997,1998and1999havebeenusedtoderiveatradingrulewhichisthenapplied out-of-sampletodatafrom2000andsoon).“Excess”measuresthefitnessimpliedbyaGPtradingruledefinedasexcessreturnoverabuy-and- holdstrategyduringtheout-of-sampleperiod,i.e.(rgp−rbh).∆SORindicatestheexcessSortinoratiodefinedas(SORgp−SORbh)(both annualized)overthespecifiedout-of-sampleperiod.#Tindicatesthenumberoftradesexecutedbyatradingruleduringout-of-sampletesting withNbandNsdenotingthenumberofbuy-days(in-the-market)andsell-days(out-of-the-market),respectively.σbandσsindicatethestandard deviationofreturnsduringGP-in-market-daysandGP-out-of-market-days,respectively.¯rband¯rsdenotethemeandailymarketreturnduring GP-in-daysandGP-out-dayswith(¯rb−¯rs)asthedifferencebetweenthetwo.(¯rb−¯rm)measuresthedifferencebetweenmeandailyreturns duringGP-in-daysandbuy-and-hold.
13.3 Genetic Programming Market Efficiency Tests 116
Samplergprbh∆rSORgpSORbh∆SOR PanelA:Transactioncosts0.1% 97−99/00−0.122512−0.1423250.019813−0.357786−0.4377530.079968 98−00/01−0.216813−0.2679730.051160−0.682543−0.9688130.286270 99−01/02−0.198992−0.1989920.000000−1.085768−1.0857680.000000 00−02/030.0295740.292751−0.2631770.1928251.916353−1.723528 01−03/040.0026300.103801−0.1011710.0000000.660709−0.660709 02−04/050.0260710.041904−0.0158330.0000000.331433−0.331433 03−05/060.2102310.287605−0.0773751.3281381.887073−0.558935 04−06/070.3133550.2963470.0170071.0163721.118694−0.102322 PanelB:Transactioncosts0.25% 97−99/000.057406−0.1453250.2027310.000000−0.4467430.446743 98−00/01−0.015305−0.2709730.255669−0.043496−0.9787800.935284 99−01/02−0.201992−0.2019920.000000−1.102137−1.1021370.000000 00−02/030.0098200.289751−0.2799310.0000001.896715−1.896715 01−03/040.1008010.1008010.0000000.6416140.6416140.000000 02−04/050.0260710.038904−0.0128330.0000000.305865−0.305865 03−05/060.2412230.284605−0.0433831.5065781.866321−0.359742 04−06/070.0565500.293347−0.2367970.0000001.106381−1.106381 PanelC:Transactioncosts0.5% 97−99/00−0.167825−0.150325−0.017500−0.482417−0.461664−0.020753 98−00/01−0.165865−0.2759730.110108−0.404343−0.9951230.590780 99−01/02−0.143000−0.2069920.063992−0.750568−1.1294190.378851 00−02/030.0256060.284751−0.2591440.1752111.871636−1.696425 01−03/04−0.2033330.095801−0.299134−1.2101630.612220−1.822383 02−04/050.0260710.033904−0.0078330.0000000.263583−0.263583 03−05/060.2005780.279605−0.0790271.3006741.830815−0.530141 04−06/070.2481660.288347−0.0401820.8050801.085736−0.280656 Table13.11b:3-yearstrainingand1-yearout-of-sampleHangSengresults.“Sample”denotesthe lengthoftrainingandsubsequentout-of-sampleperiod.rgpandrbhdenotethean- nualizedout-of-samplereturnsfortheGPtradingruleandbuy-and-hold,respectively. ∆risthedifferencebetweenthem.SORgpandSORbhindicatetherepectiveannu- alizedSortinoratiosfortheGPtradingruleandbuy-and-hold,∆SORmeasuresthe differencebetweenthetwoandisequalto∆SORintheprecedingtable.
13.3 Genetic Programming Market Efficiency Tests 117
SampleExcess∆SOR#TNbNsσbσs¯rb¯rs(¯rb−¯rs)(¯rb−¯rm) PanelA:Transactioncosts0.1% 97−99/00−010.3383230.57805111793100.0201460.017796−0.000758−0.0009210.0001630.000103 98−00/01−020.0511600.1388282398910.0153850.013755−0.001077−0.000421−0.000656−0.000122 99−01/02−03−0.246153−0.69825332602340.0120540.010795−0.0005720.001073−0.001645−0.000779 00−02/03−04−0.384107−1.2358333714250.0116940.0102940.0004170.000915−0.000498−0.000427 01−03/04−05−0.155408−0.5425734214740.0065670.008974−0.0012640.000373−0.001637−0.001568 02−04/05−06−0.024109−0.00401211393540.0085380.0080790.0019450.0001910.001754∗0.001260 03−05/06−070.0273830.2400053399920.0122800.0172780.001560−0.0001890.0017490.000328 PanelB:Transactioncosts0.25% 97−99/00−010.0670990.14690381423470.0197070.018202−0.002749−0.000089−0.002660−0.001888 98−00/01−020.2486480.54221193221670.0151610.014961−0.000642−0.0015590.0009170.000313 99−01/02−03−0.253740−0.71124112492450.0122510.010622−0.0006450.001074−0.001719−0.000853 00−02/03−04−0.400861−1.330793004960.0000000.0104950.0000000.000843−0.000843−0.000843 01−03/04−050.0000000.000000149500.0088860.0000000.0003030.0000000.0003030.000000 02−04/05−06−0.048164−0.25771912432500.0091100.0072940.0010830.0003000.0007840.000397 03−05/06−07−0.043383−0.1443091441500.0138830.0072930.0012560.0010230.0002330.000024 PanelC:Transactioncosts0.5% 97−99/00−010.3012390.52349322052840.0196160.017992−0.000781−0.0009200.0001390.000081 98−00/01−020.0582900.19465952212680.0158670.014396−0.001833−0.000231−0.001601−0.000878 99−01/02−03−0.080744−0.23749021393550.0109610.0117090.0000890.000254−0.000165−0.000119 00−02/03−04−0.379975−1.22076211023940.0109890.0103730.0003060.000982−0.000676−0.000537 01−03/04−05−0.349152−1.18847743481470.0083030.009906−0.0005010.002208−0.002709−0.000805 02−04/05−06−0.048164−0.25354912432500.0091100.0072940.0010830.0003000.0007840.000397 03−05/06−07−0.079027−0.1853153470210.0135830.0063850.0011550.002965−0.001810−0.000077 Table13.12a:3-yearstrainingand2-yearsout-of-sampleHangSengresults.“Sample”denotesthetrainingperiodusedfollowedbytheout-of-sampletesting period(forexample97-99impliesthattrainingdatafrom1997,1998and1999havebeenusedtoderiveatradingrulewhichisthenapplied out-of-sampletodatafrom2000andsoon).“Excess”measuresthefitnessimpliedbyaGPtradingruledefinedasexcessreturnoverabuy-and- holdstrategyduringtheout-of-sampleperiod,i.e.(rgp−rbh).∆SORindicatestheexcessSortinoratiodefinedas(SORgp−SORbh)(both annualized)overthespecifiedout-of-sampleperiod.#Tindicatesthenumberoftradesexecutedbyatradingruleduringout-of-sampletesting withNbandNsdenotingthenumberofbuy-days(in-the-market)andsell-days(out-of-the-market),respectively.σbandσsindicatethestandard deviationofreturnsduringGP-in-market-daysandGP-out-of-market-days,respectively.¯rband¯rsdenotethemeandailymarketreturnduring GP-in-daysandGP-out-dayswith(¯rb−¯rs)asthedifferencebetweenthetwo.(¯rb−¯rm)measuresthedifferencebetweenmeandailyreturns duringGP-in-daysandbuy-and-hold.(*)indicatessignificanceforα=0.05.
13.3 Genetic Programming Market Efficiency Tests 118
Samplergprbh∆rSORgpSORbh∆SOR PanelA:Transactioncosts0.1% 97−99/00−01−0.042516−0.2116770.169161−0.124926−0.7029770.578051 98−00/01−02−0.208940−0.2345200.025580−0.859465−0.9982930.138828 99−01/02−03−0.0728300.050246−0.123077−0.4027340.295519−0.698253 00−02/03−040.0161100.208164−0.1920530.1046191.340452−1.235833 01−03/04−05−0.0035950.074109−0.077704−0.0269670.515606−0.542573 02−04/05−060.1559920.168047−0.0120541.1988121.202824−0.004012 03−05/06−070.3152450.3015540.0136911.6147891.3747840.240005 PanelB:Transactioncosts0.25% 97−99/00−01−0.179628−0.2131770.033550−0.560794−0.7076970.146903 98−00/01−02−0.111697−0.2360200.124324−0.461956−1.0041670.542211 99−01/02−03−0.0781230.048746−0.126870−0.4245430.286697−0.711241 00−02/03−040.0062330.206664−0.2004300.0000001.330793−1.330793 01−03/04−050.0726090.0726090.0000000.5046600.5046600.000000 02−04/05−060.1424650.166546−0.0240820.9323281.190046−0.257719 03−05/06−070.2783630.300054−0.0216911.2226971.367006−0.144309 PanelC:Transactioncosts0.5% 97−99/00−01−0.065058−0.2156770.150620−0.191990−0.7154830.523493 98−00/01−02−0.209375−0.2385200.029145−0.819205−1.0138640.194659 99−01/02−030.0058750.046246−0.0403720.0350310.272521−0.237490 00−02/03−040.0141760.204164−0.1899880.0966091.317372−1.220762 01−03/04−05−0.1044670.070109−0.174576−0.7021380.486340−1.188477 02−04/05−060.1399650.164046−0.0240820.9146091.168158−0.253549 03−05/06−070.2580400.297554−0.0395141.1685841.353899−0.185315 Table13.12b:3-yearstrainingand2-yearsout-of-sampleHangSengresults.“Sample”denotesthelengthof trainingandsubsequentout-of-sampleperiod.rgpandrbhdenotetheannualizedout-of-sample returnsfortheGPtradingruleandbuy-and-hold,respectively.∆risthedifferencebetween them.SORgpandSORbhindicatetherepectiveannualizedSortinoratiosfortheGPtrading ruleandbuy-and-hold,∆SORmeasuresthedifferencebetweenthetwoandisequalto∆SOR intheprecedingtable.
13.3 Genetic Programming Market Efficiency Tests 119
SampleExcess∆SOR#TNbNsσbσs¯rb¯rs(¯rb−¯rs)(¯rb−¯rm) PanelA:Transactioncosts0.1% 97−99/00−020.5376610.69427521835530.0199480.015594−0.000834−0.0008500.0000160.000012 98−00/01−030.0511600.0818622646910.0138010.013755−0.000200−0.0004210.0002210.000027 99−01/02−04−0.412605−0.80058643164270.0117740.010549−0.0006080.000979−0.001587−0.000912 00−02/03−05−0.401262−0.9153263716720.0116940.0092910.0004170.000645−0.000228−0.000206 01−03/04−06−0.410190−0.9258574217210.0065670.009020−0.0012640.000653−0.001918−0.001863 02−04/05−07−0.295541−0.25744911515870.0089510.0122780.0018240.0006440.0011800.000938 PanelB:Transactioncosts0.25% 97−99/00−020.0884980.097996122844520.0163800.016988−0.001964−0.000143−0.001821−0.001118 98−00/01−030.1870400.291989145571800.0134920.0146520.000101−0.0012420.0013420.000328 99−01/02−04−0.374683−0.72105512494940.0122510.010463−0.0006450.000783−0.001428−0.000950 00−02/03−05−0.418016−1.036792007430.0000000.0095380.0000000.000623−0.000623−0.000623 01−03/04−060.0000000.000000174200.0089620.0000000.0005990.0000000.0005990.000000 02−04/05−07−0.048164−0.20859514882500.0133770.0072940.0011860.0003000.0008860.000300 PanelC:Transactioncosts0.5% 97−99/00−020.2779100.36054443613750.0166450.016906−0.001027−0.000671−0.000356−0.000181 98−00/01−03−0.300708−0.400234213254120.0143790.013289−0.0009590.000349−0.001308−0.000731 99−01/02−04−0.201687−0.40557221396040.0109610.0111480.0000890.000354−0.000265−0.000216 00−02/03−05−0.397131−0.89770911026410.0109890.0092950.0003060.000673−0.000367−0.000316 01−03/04−06−0.420245−0.95628055721700.0085660.0100240.0000960.002293−0.002197−0.000503 02−04/05−07−0.048164−0.20650814882500.0133770.0072940.0011860.0003000.0008860.000300 Table13.13a:3-yearstrainingand3-yearsout-of-sampleHangSengresults.“Sample”denotesthetrainingperiodusedfollowedbytheout-of-sampletesting period(forexample97-99impliesthattrainingdatafrom1997,1998and1999havebeenusedtoderiveatradingrulewhichisthenapplied out-of-sampletodatafrom2000andsoon).“Excess”measuresthefitnessimpliedbyaGPtradingruledefinedasexcessreturnoverabuy-and- holdstrategyduringtheout-of-sampleperiod,i.e.(rgp−rbh).∆SORindicatestheexcessSortinoratiodefinedas(SORgp−SORbh)(both annualized)overthespecifiedout-of-sampleperiod.#Tindicatesthenumberoftradesexecutedbyatradingruleduringout-of-sampletesting withNbandNsdenotingthenumberofbuy-days(in-the-market)andsell-days(out-of-the-market),respectively.σbandσsindicatethestandard deviationofreturnsduringGP-in-market-daysandGP-out-of-market-days,respectively.¯rband¯rsdenotethemeandailymarketreturnduring GP-in-daysandGP-out-dayswith(¯rb−¯rs)asthedifferencebetweenthetwo.(¯rb−¯rm)measuresthedifferencebetweenmeandailyreturns duringGP-in-daysandbuy-and-hold.
13.3 Genetic Programming Market Efficiency Tests 120
Samplergprbh∆rSORgpSORbh∆SOR PanelA:Transactioncosts0.1% 97−99/00−02−0.028920−0.2081410.179220−0.085875−0.7801500.694275 98−00/01−03−0.039465−0.0565190.017053−0.182741−0.2646030.081862 99−01/02−04−0.0628450.074690−0.137535−0.3510210.449565−0.800586 00−02/03−050.0198270.153581−0.1337540.1289271.044253−0.915326 01−03/04−060.0107390.147469−0.1367300.0805961.006452−0.925857 02−04/05−070.1186850.217199−0.0985140.8674891.124938−0.257449 PanelB:Transactioncosts0.25% 97−99/00−02−0.179642−0.2091410.029499−0.685708−0.7837040.097996 98−00/01−030.004828−0.0575190.0623470.022819−0.2691690.291989 99−01/02−04−0.0512050.073690−0.124894−0.2775100.443545−0.721055 00−02/03−050.0132420.152581−0.1393390.0000001.036792−1.036792 01−03/04−060.1464690.1464690.0000000.9994390.9994390.000000 02−04/05−070.2001440.216199−0.0160550.9099761.118571−0.208595 PanelC:Transactioncosts0.5% 97−99/00−02−0.118171−0.2108070.092637−0.429047−0.7895910.360544 98−00/01−03−0.159422−0.059185−0.100236−0.677341−0.277107−0.400234 99−01/02−040.0047940.072023−0.0672290.0285110.434083−0.405572 00−02/03−050.0185380.150914−0.1323770.1265021.024210−0.897709 01−03/04−060.0047200.144802−0.1400820.0313040.987584−0.956280 02−04/05−070.1984770.214532−0.0160550.9012551.107763−0.206508 Table13.13b:3-yearstrainingand3-yearsout-of-sampleHangSengresults.“Sample”denotesthelengthof trainingandsubsequentout-of-sampleperiod.rgpandrbhdenotetheannualizedout-of-sample returnsfortheGPtradingruleandbuy-and-hold,respectively.∆risthedifferencebetween them.SORgpandSORbhindicatetherepectiveannualizedSortinoratiosfortheGPtrading ruleandbuy-and-hold,∆SORmeasuresthedifferencebetweenthetwoandisequalto∆SOR intheprecedingtable.
13.3 Genetic Programming Market Efficiency Tests 121
SampleExcess∆SOR#TNbNsσbσs¯rb¯rs(¯rb−¯rs)(¯rb−¯rm) PanelA:Transactioncosts0.1% 97−01/02−0.031945−0.15529431321140.0116540.012790−0.0017640.000314−0.002078−0.000963 98−02/03−0.172503−1.2667141631840.0114710.0104220.0017970.0009870.0008100.000604 99−03/04−0.203644−1.19678631101380.0111010.009488−0.0008640.001455−0.002319−0.001291 00−04/05−0.071645−0.565159101391070.0074270.007044−0.0001590.000616−0.000775−0.000337 01−05/06−0.247980−1.887073002460.0000000.0091160.0000000.001177−0.001177−0.001177 02−06/07−0.255342−1.118694002440.0000000.0165800.0000000.001223−0.001223−0.001223 PanelB:Transactioncosts0.25% 97−01/020.0728290.4028611149970.0121410.012385−0.000877−0.000683−0.000194−0.000077 98−02/03−0.167336−1.2387001781690.0116650.0102280.0015250.0010400.0004850.000332 99−03/040.0000000.000000124800.0102780.0000000.0004270.0000000.0004270.000000 00−04/050.0538360.4441151152940.0073170.0071460.000609−0.0005170.0011260.000430 01−05/06−0.105882−0.6140693771690.0090810.0091240.0021550.0007320.0014240.000978 02−06/07−0.252342−1.106381002440.0000000.0165800.0000000.001223−0.001223−0.001223 PanelC:Transactioncosts0.5% 97−01/02−0.058052−0.2980352202440.0119680.013248−0.0012280.001162−0.002390−0.000427 98−02/03−0.076184−0.6412021971500.0109110.0105180.0021750.0005590.0016160.000981 99−03/040.0000000.000000124800.0102780.0000000.0004270.0000000.0004270.000000 00−04/05−0.007833−0.263583002460.0000000.0072580.0000000.000178−0.000178−0.000178 01−05/06−0.129261−0.8796652501960.0092290.0090660.0027630.0007730.0019900.001586 02−06/07−0.247342−1.085736002440.0000000.0165800.0000000.001223−0.001223−0.001223 Table13.14a:5-yearstrainingand1-yearout-of-sampleHangSengresults.“Sample”denotesthetrainingperiodusedfollowedbytheout-of-sampletesting period(forexample97-99impliesthattrainingdatafrom1997,1998and1999havebeenusedtoderiveatradingrulewhichisthenapplied out-of-sampletodatafrom2000andsoon).“Excess”measuresthefitnessimpliedbyaGPtradingruledefinedasexcessreturnoverabuy-and- holdstrategyduringtheout-of-sampleperiod,i.e.(rgp−rbh).∆SORindicatestheexcessSortinoratiodefinedas(SORgp−SORbh)(both annualized)overthespecifiedout-of-sampleperiod.#Tindicatesthenumberoftradesexecutedbyatradingruleduringout-of-sampletesting withNbandNsdenotingthenumberofbuy-days(in-the-market)andsell-days(out-of-the-market),respectively.σbandσsindicatethestandard deviationofreturnsduringGP-in-market-daysandGP-out-of-market-days,respectively.¯rband¯rsdenotethemeandailymarketreturnduring GP-in-daysandGP-out-dayswith(¯rb−¯rs)asthedifferencebetweenthetwo.(¯rb−¯rm)measuresthedifferencebetweenmeandailyreturns duringGP-in-daysandbuy-and-hold.
13.3 Genetic Programming Market Efficiency Tests 122
Samplergprbh∆rSORgpSORbh∆SOR PanelA:Transactioncosts0.1% 97−01/02−0.230937−0.198992−0.031945−1.241062−1.085768−0.155294 98−02/030.1202480.292751−0.1725030.6496391.916353−1.266714 99−03/04−0.0998430.103801−0.203644−0.5360770.660709−1.196786 00−04/05−0.0297410.041904−0.071645−0.2337260.331433−0.565159 01−05/060.0396250.287605−0.2479800.0000001.887073−1.887073 02−06/070.0410060.296347−0.2553420.0000001.118694−1.118694 PanelB:Transactioncosts0.25% 97−01/02−0.129163−0.2019920.072829−0.699276−1.1021370.402861 98−02/030.1224140.289751−0.1673360.6580141.896715−1.238700 99−03/040.1008010.1008010.0000000.6416140.6416140.000000 00−04/050.0927400.0389040.0538360.7499800.3058650.444115 01−05/060.1787240.284605−0.1058821.2522511.866321−0.614069 02−06/070.0410060.293347−0.2523420.0000001.106381−1.106381 PanelC:Transactioncosts0.5% 97−01/02−0.265044−0.206992−0.058052−1.427454−1.129419−0.298035 98−02/030.2085660.284751−0.0761841.2304341.871636−0.641202 99−03/040.0958010.0958010.0000000.6122200.6122200.000000 00−04/050.0260710.033904−0.0078330.0000000.263583−0.263583 01−05/060.1503440.279605−0.1292610.9511491.830815−0.879665 02−06/070.0410060.288347−0.2473420.0000001.085736−1.085736 Table13.14b:5-yearstrainingand1-yearout-of-sampleHangSengresults.“Sample”denotesthe lengthoftrainingandsubsequentout-of-sampleperiod.rgpandrbhdenotethean- nualizedout-of-samplereturnsfortheGPtradingruleandbuy-and-hold,respectively. ∆risthedifferencebetweenthem.SORgpandSORbhindicatetherepectiveannu- alizedSortinoratiosfortheGPtradingruleandbuy-and-hold,∆SORmeasuresthe differencebetweenthetwoandisequalto∆SORintheprecedingtable.
13.3 Genetic Programming Market Efficiency Tests 123
SampleExcess∆SOR#TNbNsσbσs¯rb¯rs(¯rb−¯rs)(¯rb−¯rm) PanelA:Transactioncosts0.1% 97−01/02−03−0.182229−0.524252162192750.0114950.011497−0.0002940.000607−0.000901−0.000502 98−02/03−04−0.342232−1.13933152182780.0111920.0099160.0003360.001241−0.000905−0.000507 99−03/04−05−0.269518−0.897080132342610.0091330.008617−0.0004740.001001−0.001475−0.000778 00−04/05−06−0.155689−0.565335143331600.0082530.0082330.0005620.000944−0.000382−0.000124 01−05/06−07−0.545040−1.2432381594320.0127180.013444−0.0001910.001427−0.001618−0.001424 PanelB:Transactioncosts0.25% 97−01/02−03−0.030089−0.09758242402540.0117990.0112180.0003050.0001150.0001890.000097 98−02/03−04−0.064590−0.18905922942020.0103880.0106530.0011910.0003370.0008540.000348 99−03/04−050.0011670.00151173741210.0092390.0077120.000456−0.0001690.0006260.000153 00−04/05−060.0538360.1733701399940.0084610.0071460.000969−0.0005170.0014860.000283 01−05/06−07−0.105882−0.35949733221690.0151180.0091240.0014950.0007320.0007640.000263 PanelC:Transactioncosts0.5% 97−01/02−03−0.055338−0.16435543751190.0112740.0122060.0001870.000272−0.000085−0.000021 98−02/03−04−0.243735−0.84170952792170.0109730.0098700.0007360.000982−0.000246−0.000108 99−03/04−05−0.016668−0.06952043871080.0093340.0070780.000400−0.0000430.0004430.000097 00−04/05−06−0.262580−1.168158004930.0000000.0082400.0000000.000686−0.000686−0.000686 01−05/06−07−0.129261−0.44058122951960.0155750.0090660.0015380.0007730.0007650.000305 Table13.15a:5-yearstrainingand2-yearsout-of-sampleHangSengresults.“Sample”denotesthetrainingperiodusedfollowedbytheout-of-sampletesting period(forexample97-99impliesthattrainingdatafrom1997,1998and1999havebeenusedtoderiveatradingrulewhichisthenapplied out-of-sampletodatafrom2000andsoon).“Excess”measuresthefitnessimpliedbyaGPtradingruledefinedasexcessreturnoverabuy-and- holdstrategyduringtheout-of-sampleperiod,i.e.(rgp−rbh).∆SORindicatestheexcessSortinoratiodefinedas(SORgp−SORbh)(both annualized)overthespecifiedout-of-sampleperiod.#Tindicatesthenumberoftradesexecutedbyatradingruleduringout-of-sampletesting withNbandNsdenotingthenumberofbuy-days(in-the-market)andsell-days(out-of-the-market),respectively.σbandσsindicatethestandard deviationofreturnsduringGP-in-market-daysandGP-out-of-market-days,respectively.¯rband¯rsdenotethemeandailymarketreturnduring GP-in-daysandGP-out-dayswith(¯rb−¯rs)asthedifferencebetweenthetwo.(¯rb−¯rm)measuresthedifferencebetweenmeandailyreturns duringGP-in-daysandbuy-and-hold.
13.3 Genetic Programming Market Efficiency Tests 124
Samplergprbh∆rSORgpSORbh∆SOR PanelA:Transactioncosts0.1% 97−01/02−03−0.0408680.050246−0.091115−0.2287320.295519−0.524252 98−02/03−040.0370480.208164−0.1711160.2011211.340452−1.139331 99−03/04−05−0.0606500.074109−0.134759−0.3814730.515606−0.897080 00−04/05−060.0902020.168047−0.0778450.6374891.202824−0.565335 01−05/06−070.0290340.301554−0.2725200.1315461.374784−1.243238 PanelB:Transactioncosts0.25% 97−01/02−030.0337020.048746−0.0150440.1891150.286697−0.097582 98−02/03−040.1743690.206664−0.0322951.1417341.330793−0.189059 99−03/04−050.0731920.0726090.0005840.5061710.5046600.001511 00−04/05−060.1934640.1665460.0269181.3634171.1900460.173370 01−05/06−070.2471130.300054−0.0529411.0075091.367006−0.359497 PanelC:Transactioncosts0.5% 97−01/02−030.0185770.046246−0.0276690.1081660.272521−0.164355 98−02/03−040.0822960.204164−0.1218680.4756621.317372−0.841709 99−03/04−050.0617750.070109−0.0083340.4168190.486340−0.069520 00−04/05−060.0327560.164046−0.1312900.0000001.168158−1.168158 01−05/06−070.2329230.297554−0.0646310.9133181.353899−0.440581 Table13.15b:5-yearstrainingand2-yearsout-of-sampleHangSengresults.“Sample”denotesthelengthof trainingandsubsequentout-of-sampleperiod.rgpandrbhdenotetheannualizedout-of-sample returnsfortheGPtradingruleandbuy-and-hold,respectively.∆risthedifferencebetween them.SORgpandSORbhindicatetherepectiveannualizedSortinoratiosfortheGPtrading ruleandbuy-and-hold,∆SORmeasuresthedifferencebetweenthetwoandisequalto∆SOR intheprecedingtable.
13.3 Genetic Programming Market Efficiency Tests 125
SampleExcess∆SOR#TNbNsσbσs¯rb¯rs(¯rb−¯rs)(¯rb−¯rm) PanelA:Transactioncosts0.1% 997−01/02−04−0.303167−0.596732162195240.0114950.010941−0.0002940.000554−0.000849−0.000598 98−02/03−05−0.344164−0.80166474303130.0094430.0096610.0002710.001106−0.000835−0.000352 99−03/04−06−0.400346−0.916821184303120.0090150.0088610.0001250.001251−0.001126−0.000473 00−04/05−07−0.298276−0.548746165152230.0121340.0105640.0006870.001345−0.000659−0.000199 PanelB:Transactioncosts0.25% 97−01/02−040.0116650.02247154093340.0110950.0111270.000595−0.0000510.0006460.000290 98−02/03−05−0.110072−0.24478624013420.0095920.0094830.0008210.0003900.0004300.000198 99−03/04−06−0.185420−0.426435185132290.0092700.0082490.0006160.0005610.0000550.000017 00−04/05−070.0538360.0439951644940.0121910.0071460.001090−0.0005170.0016070.000205 PanelC:Transactioncosts0.5% 97−01/02−04−0.124409−0.25098554632800.0109540.0113730.0002860.000334−0.000048−0.000018 98−02/03−05−0.343745−0.79909094433000.0098240.0091060.0004110.000936−0.000526−0.000212 99−03/04−06−0.233037−0.550238125511910.0094080.0075470.0005430.000759−0.000216−0.000056 00−04/05−07−0.537523−1.107763007380.0000000.0116790.0000000.000886−0.000886−0.000886 Table13.16a:5-yearstrainingand3-yearsout-of-sampleHangSengresults.“Sample”denotesthetrainingperiodusedfollowedbytheout-of-sampletesting period(forexample97-99impliesthattrainingdatafrom1997,1998and1999havebeenusedtoderiveatradingrulewhichisthenapplied out-of-sampletodatafrom2000andsoon).“Excess”measuresthefitnessimpliedbyaGPtradingruledefinedasexcessreturnoverabuy-and- holdstrategyduringtheout-of-sampleperiod,i.e.(rgp−rbh).∆SORindicatestheexcessSortinoratiodefinedas(SORgp−SORbh)(both annualized)overthespecifiedout-of-sampleperiod.#Tindicatesthenumberoftradesexecutedbyatradingruleduringout-of-sampletesting withNbandNsdenotingthenumberofbuy-days(in-the-market)andsell-days(out-of-the-market),respectively.σbandσsindicatethestandard deviationofreturnsduringGP-in-market-daysandGP-out-of-market-days,respectively.¯rband¯rsdenotethemeandailymarketreturnduring GP-in-daysandGP-out-dayswith(¯rb−¯rs)asthedifferencebetweenthetwo.(¯rb−¯rm)measuresthedifferencebetweenmeandailyreturns duringGP-in-daysandbuy-and-hold.
13.3 Genetic Programming Market Efficiency Tests 126
Samplergprbh∆rSORgpSORbh∆SOR PanelA:Transactioncosts0.1% 97−01/02−04−0.0263660.074690−0.101056−0.1471680.449565−0.596732 98−02/03−050.0388600.153581−0.1147210.2425891.044253−0.801664 99−03/04−060.0140200.147469−0.1334490.0896311.006452−0.916821 00−04/05−070.1177730.217199−0.0994250.5761921.124938−0.548746 PanelB:Transactioncosts0.25% 97−01/02−040.0775780.0736900.0038880.4660170.4435450.022471 98−02/03−050.1158900.152581−0.0366910.7920071.036792−0.244786 99−03/04−060.0846620.146469−0.0618070.5730050.999439−0.426435 00−04/05−070.2341440.2161990.0179451.1625661.1185710.043995 PanelC:Transactioncosts0.5% 97−01/02−040.0305540.072023−0.0414700.1830990.434083−0.250985 98−02/03−050.0363330.150914−0.1145820.2251201.024210−0.799090 99−03/04−060.0671230.144802−0.0776790.4373460.987584−0.550238 00−04/05−070.0353580.214532−0.1791740.0000001.107763−1.107763 Table13.16b:5-yearstrainingand3-yearsout-of-sampleHangSengresults.“Sample”denotesthelengthof trainingandsubsequentout-of-sampleperiod.rgpandrbhdenotetheannualizedout-of-sample returnsfortheGPtradingruleandbuy-and-hold,respectively.∆risthedifferencebetween them.SORgpandSORbhindicatetherepectiveannualizedSortinoratiosfortheGPtrading ruleandbuy-and-hold,∆SORmeasuresthedifferencebetweenthetwoandisequalto∆SOR intheprecedingtable.
13.3 Genetic Programming Market Efficiency Tests 127
1-yearout-of-sample2-yearsout-of-sample3-yearsout-of-sample TradingRuleExcess∆SORExcess∆SORExcess∆SOR 3-yearsin-sample
97−99/...c0250.2027310.4467430.0670990.1469030.0884980.097996 98−00/...c0250.2556690.9352840.2486480.5422110.1849070.291989 97−99/...c050.3012390.5234930.2779100.360544 98−00/...c050.1101080.5907800.0582900.194659 99−01/...c050.0639920.378851 5-yearsin-sample97−01/...c0250.0728290.4028610.0116650.022471 99−03/...c0250.0011670.001511 00−04/...c0250.0538360.4441150.0538360.1733700.0538360.043995 Table13.17:BestGeneticProgrammingtradingrulesfortheHangSeng.
13.4 Conclusions about Market Efficiency in the DAX and the Hang Seng128
13.4 Conclusions about Market Efficiency in the DAX and the Hang Seng
Jensen (1978) considered markets to be efficient if there are no gains from trad-ing based on available information after risk adjustment and transaction costs.
In the thesis at hand, GP was tasked to find trading rules based on the most common set of information, i. e. closing prices106 therefore testing for weak market efficiency. Appropriate transaction costs (c = 0.25, 0.5) were included in the analysis and the Sortino ratio acted as a measure for risk-adjusted returns.
In the thesis at hand, GP was tasked to find trading rules based on the most common set of information, i. e. closing prices106 therefore testing for weak market efficiency. Appropriate transaction costs (c = 0.25, 0.5) were included in the analysis and the Sortino ratio acted as a measure for risk-adjusted returns.