# What methods to use for statistical prediction/forecast of trading data?

I’m working on a trading system and need to apply some statistics on the results. Unfortunately I forgot all about statistics after I left university over a decade ago and now I really have no clue how I must calculate what I need. Hopefully someone can help me out.

Out of the trading application (currently in test mode), I get profit / loss (PL) per trade and per day.

Let’s say I have the day-to-day PL (an accumulation will give the total PL over the given period) of 5 years back testing (about 1250 points), what is the best way of “predicting” what the total profit might be in the next 6 months (125 points ahead) and the next year (250 points ahead)?

Of course not every trade is profitable. So I have some trades with losses and (hopefully) more trades with profit.

What is the best way of calculating what the profit per day (with a certain reliability) will be when you only take the winning trades into account, what lose will be when you only look at the losing trades and what the PL will be when you take both winning and losing trade combined.

How can I calculate the change that over an X period of time, the strategy will, with a certain percentage of reliability) make money?

Furthermore, I will of course not trade just one strategy, but multiple. Based on back testing, how can I calculate the likelihood that the portfolio I will be trading will make money in x period and how can I calculate the bandwidth for the expected profit for the pool?

Hope you can help me out which methods to use (I’ll be programming it in C# by the way).

Example of day-to-day PL (rounded rounded to 0 decimals for the layout):

DBDate  PeriodToPeriodPL        Accumulation
20060720    0
20060721    -1741       -1741
20060724    -716        -2458
20060725    -821        -3279
20060726    -149        -3427
20060727    -3517       -6945
20060728    2253        -4692
20060731    97      -4594
20060801    54      -4541
20060802    329     -4212
20060803    726     -3486
20060804    569     -2917
20060807    1359        -1558
20060808    -682        -2240
20060809    -635        -2874
20060810    -277        -3152
20060811    -255        -3406
20060814    -542        -3948
20060815    -1320       -5268
20060816    932     -4336
20060817    2553        -1783
20060818    -155        -1938
20060821    -367        -2305
20060822    669     -1637
20060823    433     -1204
20060824    -734        -1938
20060825    361     -1577
20060828    -479        -2056
20060829    -363        -2419
20060830    -1268       -3686
20060831    -424        -4111
20060901    779     -3331
20060904    1857        -1475
20060905    -356        -1831
20060906    -163        -1994
20060907    -458        -2452
20060908    1130        -1322
20060911    -254        -1576
20060912    -731        -2308
20060913    -442        -2749
20060914    986     -1763
20060915    -497        -2260
20060918    1236        -1024
20060919    -842        -1866
20060920    80      -1786
20060921    -2628       -4413
20060922    185     -4228
20060925    -111        -4339
20060926    377     -3963
20060927    -1806       -5769
20060928    881     -4888
20060929    -800        -5688
20061002    2010        -3677
20061003    794     -2884
20061004    1063        -1821
20061005    2214        393
20061006    1110        1503
20061009    1401        2903
20061010    -65     2838
20061011    -77     2761
20061012    -787        1974
20061013    -1512       462
20061016    300     762
20061017    1058        1820
20061018    1625        3445
20061019    773     4218
20061020    1854        6072
20061023    492     6564
20061024    -1063       5501
20061025    1230        6731
20061026    148     6878
20061027    11      6889
20061030    -1189       5700
20061031    -47     5652
20061101    -484        5168
20061102    -152        5017
20061103    -998        4019
20061106    -591        3428
20061107    -970        2458
20061108    378     2836
20061109    1217        4052
20061110    745     4797
20061113    201     4998
20061114    -454        4545
20061115    149     4693
20061116    134     4828
20061117    -677        4151
20061120    1404        5555
20061121    864     6418
20061122    271     6689
20061123    1503        8192
20061124    4577        12769
20061127    2245        15014
20061128    -2902       12112
20061129    2002        14114
20061130    1108        15222
20061201    1256        16479
20061204    2236        18715
20061205    -1496       17219
20061206    842     18061
20061207    -1639       16422
20061208    650     17072
20061211    248     17320
20061212    -218        17102
20061213    -873        16228
20061214    -364        15865
20061215    -27     15838
20061218    -543        15295
20061219    -974        14321
20061220    2152        16473
20061221    3382        19855
20061222    -22     19832
20061227    -44     19789
20061228    1497        21286
20061229    979     22265
20070102    -1136       21129
20070103    -620        20509
20070104    -2040       18469
20070105    -3541       14927
20070108    -337        14591
20070109    3120        17711
20070110    -1904       15806
20070111    -778        15028
20070112    514     15542
20070115    141     15683
20070116    828     16511
20070117    2184        18694
20070118    769     19463
20070119    -391        19072
20070122    -1349       17723
20070123    -231        17492
20070124    1493        18985
20070125    -7452       11533
20070126    -1504       10029
20070129    496     10526
20070130    4924        15450
20070131    -482        14968
20070201    -683        14285
20070202    -2375       11910
20070205    509     12420
20070206    3099        15519
20070207    -765        14753
20070208    859     15613
20070209    -162        15451
20070212    -61     15390
20070213    -1330       14060
20070214    884     14944
20070215    -524        14420
20070216    1504        15924
20070219    966     16890
20070220    577     17467
20070221    3182        20649
20070222    2579        23228
20070223    -2234       20994
20070226    -1637       19357
20070227    683     20040
20070228    1572        21612
20070301    -83     21528
20070302    371     21899
20070305    1089        22988
20070306    -470        22518
20070307    157     22675
20070308    -839        21837
20070309    209     22046
20070312    1658        23705
20070313    -970        22734
20070314    -1319       21415
20070315    1298        22713
20070316    204     22918
20070319    -894        22024
20070320    -1189       20835
20070321    -231        20604
20070322    -1939       18666
20070323    189     18854
20070326    -364        18490
20070327    616     19106
20070328    -2183       16922
20070329    570     17492
20070330    897     18389
20070402    501     18889
20070403    1067        19956
20070404    -243        19714
20070405    -2119       17595
20070410    2158        19753
20070411    -753        19000
20070412    -648        18353
20070413    1046        19399
20070416    1773        21172
20070417    -312        20859
20070418    203     21062
20070419    3498        24560
20070420    5839        30399
20070423    1620        32019
20070424    -3004       29015
20070425    -1182       27833
20070426    -1897       25936
20070427    -1849       24087
20070430    0       24087
20070502    0       24087
20070503    0       24087
20070504    0       24087
20070507    1515        25602
20070508    899     26501
20070509    120     26620
20070510    -743        25878
20070511    6129        32007
20070514    -618        31389
20070515    -321        31068
20070516    -2096       28972
20070517    9       28981
20070518    3362        32343
20070521    806     33149
20070522    824     33973
20070523    41      34014
20070524    4741        38755
20070525    1337        40092
20070529    -258        39834
20070530    -1037       38797
20070531    -2438       36359
20070601    -227        36132
20070604    -1223       34909
20070605    -309        34601
20070606    465     35065
20070607    -1273       33792
20070608    1515        35308
20070611    -1985       33323
20070612    0       33323
20070613    977     34299
20070614    3523        37823
20070615    2774        40597
20070618    -1459       39138
20070619    1491        40628
20070620    2928        43556
20070621    -1287       42269
20070622    436     42706
20070625    151     42857
20070626    509     43366
20070627    -626        42741
20070628    2392        45133
20070629    -1406       43727
20070702    510     44236
20070703    2164        46401
20070704    1362        47763
20070705    123     47886
20070706    -1548       46338
20070709    -994        45344
20070710    1279        46623
20070711    993     47616
20070712    -274        47341
20070713    775     48116
20070716    1083        49200
20070717    1581        50780
20070718    272     51052
20070719    -1402       49650
20070720    1273        50924
20070723    -601        50322
20070724    -423        49899
20070725    4208        54107
20070726    5212        59320
20070727    -1074       58246
20070730    -1086       57160
20070731    2303        59463
20070801    -851        58613
20070802    3749        62362
20070803    -573        61788
20070806    161     61950
20070807    -737        61213
20070808    447     61660
20070809    85      61745
20070810    -1190       60555
20070813    -2268       58287
20070814    -1279       57008
20070815    1787        58796
20070816    2640        61435
20070817    200     61636
20070820    -2181       59454
20070821    228     59683
20070822    -2426       57256
20070823    469     57725
20070824    894     58619
20070827    -719        57900
20070828    -2274       55625
20070829    -609        55016
20070830    -354        54662
20070831    -1308       53354
20070903    -754        52600
20070904    1138        53738
20070905    580     54318
20070906    700     55018
20070907    -3132       51887
20070910    1395        53282
20070911    -852        52430
20070912    1468        53898
20070913    463     54361
20070914    2815        57176
20070917    2957        60133
20070918    -612        59521
20070919    -4888       54633
20070920    384     55017
20070921    3331        58348
20070924    -626        57722
20070925    -2263       55459
20070926    -2498       52961
20070927    -2361       50600
20070928    286     50887
20071001    -1173       49713
20071002    1842        51555
20071003    582     52138
20071004    -400        51737
20071005    -374        51363
20071008    -2136       49227
20071009    188     49414
20071010    -214        49200
20071011    11      49211
20071012    439     49650
20071015    3112        52762
20071016    4980        57742
20071017    484     58225
20071018    2472        60697
20071019    -802        59896
20071022    1324        61220
20071023    -816        60404
20071024    3213        63617
20071025    92      63709
20071026    -413        63296
20071029    -2371       60925
20071030    -550        60375
20071031    1879        62254
20071101    -389        61865
20071102    321     62186
20071105    1033        63218
20071106    1505        64724
20071107    -1148       63576
20071108    9273        72849
20071109    -1341       71508
20071112    -86     71422
20071113    -1523       69899
20071114    5691        75590
20071115    -825        74765
20071116    -3407       71358
20071119    -2476       68882
20071120    923     69805
20071121    1226        71031
20071122    507     71539
20071123    -3045       68494
20071126    316     68810
20071127    -434        68376
20071128    978     69354
20071129    1120        70474
20071130    1842        72315
20071203    -1072       71243
20071204    -2216       69027
20071205    -1354       67673
20071206    1242        68915
20071207    -691        68224
20071210    -2518       65706
20071211    1337        67044
20071212    -581        66462
20071213    -1408       65054
20071214    145     65198
20071217    -3034       62165
20071218    -1477       60687
20071219    -2574       58113
20071220    0       58113
20071221    3305        61419
20071227    -1763       59655
20071228    114     59770
20080102    -731        59039
20080103    4131        63170
20080104    2157        65327
20080107    4497        69825
20080108    -3348       66477
20080109    5641        72118
20080110    827     72945
20080111    -2459       70486
20080114    -4188       66297
20080115    -2038       64260
20080116    -1244       63016
20080117    0       63016
20080118    0       63016
20080121    1429        64445
20080122    -6762       57683
20080123    1834        59517
20080124    -2579       56938
20080125    -1874       55064
20080128    -1050       54013
20080129    -3025       50989
20080130    0       50989
20080131    657     51646
20080201    3606        55252
20080204    550     55802
20080205    -4845       50957
20080206    659     51617
20080207    2697        54314
20080208    -746        53568
20080211    838     54406
20080212    -448        53958
20080213    -121        53837
20080214    -1257       52581
20080215    -324        52257
20080218    502     52759
20080219    -171        52587
20080220    1108        53695
20080221    -203        53493
20080222    5385        58878
20080225    772     59650
20080226    2802        62452
20080227    940     63392
20080228    -3395       59998
20080229    -3194       56804
20080303    63      56866
20080304    458     57324
20080305    -2545       54780
20080306    3370        58149
20080307    712     58861
20080310    3039        61900
20080311    -658        61241
20080312    -1338       59904
20080313    1720        61623
20080314    -348        61275
20080317    14165       75440
20080318    -4111       71329
20080319    1421        72750
20080320    761     73511
20080325    387     73897
20080326    -1233       72664
20080327    280     72944
20080328    -1000       71944
20080331    -240        71704
20080401    2068        73772
20080402    -1139       72633
20080403    -2814       69818
20080404    0       69818
20080407    0       69818
20080408    -976        68842
20080409    -635        68207
20080410    2204        70412
20080411    -2373       68039
20080414    294     68333
20080415    1928        70261
20080416    1701        71962
20080417    -218        71744
20080418    5511        77255
20080421    397     77652
20080422    -694        76958
20080423    2855        79813
20080424    -109        79703
20080425    982     80685
20080428    959     81644
20080429    -1556       80088
20080430    2966        83053
20080502    869     83922
20080505    -598        83324
20080506    -2961       80363
20080507    1572        81935
20080508    80      82015
20080509    956     82971
20080512    64      83035
20080513    -351        82683
20080514    234     82917
20080515    -155        82763
20080516    -1792       80971
20080519    -1756       79215
20080520    -996        78219
20080521    -3039       75180
20080522    2047        77227
20080523    930     78156
20080526    -91     78065
20080527    1468        79534
20080528    855     80388
20080529    2082        82470
20080530    -1357       81114
20080602    766     81879
20080603    2640        84519
20080604    -1182       83337
20080605    -883        82454
20080606    284     82738
20080609    607     83345
20080610    -1099       82245
20080611    465     82710
20080612    2730        85440
20080613    3357        88797
20080616    858     89656
20080617    1707        91363
20080618    -1158       90205
20080619    -1267       88938
20080620    519     89457
20080623    -427        89029
20080624    -519        88511
20080625    488     88999
20080626    2398        91397
20080627    86      91483
20080630    2527        94010
20080701    981     94990
20080702    3712        98703
20080703    -2159       96544
20080704    -407        96137
20080707    -72     96065
20080708    -382        95684
20080709    3493        99176
20080710    646     99822
20080711    -1273       98549
20080714    1904        100453
20080715    219     100673
20080716    -131        100542
20080717    3144        103686
20080718    4944        108630
20080721    -1150       107480
20080722    -1189       106291
20080723    1711        108002
20080724    -1233       106769
20080725    1286        108055
20080728    -982        107073
20080729    749     107822
20080730    5316        113138
20080731    536     113674
20080801    -1509       112166
20080804    -462        111704
20080805    -1617       110087
20080806    -2006       108081
20080807    -396        107685
20080808    342     108027
20080811    1433        109460
20080812    -1532       107928
20080813    -932        106996
20080814    -756        106240
20080815    -1902       104338
20080818    -240        104098
20080819    -1652       102445
20080820    -247        102199
20080821    1876        104075
20080822    -122        103953
20080825    727     104679
20080826    424     105103
20080827    704     105807
20080828    -1731       104076
20080829    -1425       102651
20080901    386     103037
20080902    2854        105891
20080903    -554        105337
20080904    -1844       103493
20080905    -311        103182
20080908    -1237       101945
20080909    -901        101044
20080910    -230        100813
20080911    892     101706
20080912    -786        100919
20080915    60      100980
20080916    675     101654
20080917    274     101929
20080918    1770        103699
20080919    1341        105039
20080922    -3465       101574
20080923    1640        103214
20080924    670     103885
20080925    2537        106422
20080926    812     107234
20080929    682     107916
20080930    280     108196
20081001    4068        112264
20081002    2195        114459
20081003    1594        116053
20081006    4246        120298
20081007    2836        123134
20081008    4321        127455
20081009    -10120      117335
20081010    3316        120651
20081013    -1598       119053
20081014    347     119400
20081015    -8093       111308
20081016    0       111308
20081017    1124        112432
20081020    -955        111477
20081021    -4785       106692
20081022    -4139       102553
20081023    0       102553
20081024    3450        106003
20081027    654     106657
20081028    1201        107858
20081029    -5078       102780
20081030    -606        102175
20081031    1445        103619
20081103    -2367       101252
20081104    3176        104428
20081105    -2022       102406
20081106    -5305       97102
20081107    3269        100370
20081110    -1164       99206
20081111    7168        106375
20081112    -1697       104678
20081113    -5533       99145
20081114    3514        102658
20081117    -2201       100458
20081118    103     100561
20081119    1036        101597
20081120    -3323       98274
20081121    3779        102053
20081124    6253        108306
20081125    -310        107996
20081126    -2467       105528
20081127    5954        111482
20081128    -5365       106117
20081201    872     106989
20081202    2367        109356
20081203    4042        113399
20081204    1450        114848
20081205    -1379       113469
20081208    6825        120294
20081209    -88     120206
20081210    -55     120151
20081211    -4669       115482
20081212    1252        116734
20081215    1354        118088
20081216    -3373       114715
20081217    235     114950
20081218    -2468       112482
20081219    6824        119306
20081222    -2837       116469
20081223    -4      116465
20081229    -770        115695
20081230    392     116087
20090102    1867        117955
20090105    -4472       113483
20090106    -3416       110066
20090107    0       110066
20090108    0       110066
20090109    52      110119
20090112    -249        109870
20090113    2734        112604
20090114    8881        121485
20090115    -2455       119030
20090116    -198        118832
20090119    230     119062
20090120    1886        120948
20090121    -3702       117247
20090122    -1244       116003
20090123    -4808       111196
20090126    0       111196
20090127    0       111196
20090128    0       111196
20090129    -435        110761
20090130    -2336       108425
20090202    -275        108150
20090203    0       108150
20090204    -3830       104320
20090205    1278        105598
20090206    5668        111266
20090209    284     111550
20090210    -3889       107661
20090211    2495        110156
20090212    1108        111264
20090213    2685        113948
20090216    818     114766
20090217    -2319       112447
20090218    1189        113636
20090219    -2880       110756
20090220    1654        112410
20090223    733     113143
20090224    412     113555
20090225    -1263       112292
20090226    -4482       107810
20090227    -582        107229
20090302    2809        110037
20090303    -1284       108754
20090304    636     109390
20090305    -2882       106508
20090306    833     107341
20090309    -1663       105678
20090310    -6352       99326
20090311    1938        101264
20090312    1210        102474
20090313    -1935       100539
20090316    -688        99851
20090317    -2204       97647
20090318    1638        99284
20090319    2576        101861
20090320    375     102235
20090323    -2732       99503
20090324    1307        100810
20090325    6612        107422
20090326    -293        107129
20090327    -2379       104750
20090330    2742        107493
20090331    -1959       105533
20090401    946     106479
20090402    -2477       104001
20090403    7464        111465
20090406    -7020       104445
20090407    -3336       101109
20090408    2225        103334
20090409    -3459       99875
20090414    -713        99162
20090415    -71     99091
20090416    1230        100321
20090417    -631        99690
20090420    -2572       97118
20090421    727     97845
20090422    -4116       93729
20090423    6776        100505
20090424    3696        104201
20090427    985     105186
20090428    -4244       100942
20090429    6240        107182
20090430    -1630       105553
20090504    1060        106613
20090505    -2929       103684
20090506    -1419       102265
20090507    2562        104828
20090508    922     105750
20090511    1900        107651
20090512    595     108246
20090513    3797        112043
20090514    -2279       109763
20090515    523     110287
20090518    -2667       107620
20090519    4392        112012
20090520    -498        111514
20090521    -2519       108995
20090522    215     109210
20090525    -621        108589
20090526    126     108716
20090527    -858        107857
20090528    2036        109893
20090529    -1      109892
20090601    -3189       106703
20090602    -389        106314
20090603    219     106533
20090604    524     107057
20090605    2360        109417
20090608    -898        108520
20090609    -1937       106583
20090610    -2050       104533
20090611    493     105026
20090612    378     105405
20090615    2129        107534
20090616    -1088       106446
20090617    -11     106435
20090618    1360        107795
20090619    526     108321
20090622    1432        109753
20090623    2357        112110
20090624    -1823       110287
20090625    153     110441
20090626    -963        109478
20090629    950     110427
20090630    -1051       109376
20090701    149     109526
20090702    -3063       106463
20090703    -711        105752
20090706    -312        105440
20090707    -644        104796
20090708    96      104892
20090709    2619        107511
20090710    -1184       106326
20090713    2321        108647
20090714    270     108917
20090715    469     109386
20090716    389     109775
20090717    906     110681
20090720    -340        110341
20090721    2704        113045
20090722    -187        112858
20090723    2280        115138
20090724    391     115529
20090727    1436        116965
20090728    -647        116318
20090729    2547        118865
20090730    -1457       117408
20090731    -2441       114968
20090803    -1691       113276
20090804    396     113672
20090805    -1325       112347
20090806    -2574       109774
20090807    1007        110781
20090810    -398        110383
20090811    -1113       109270
20090812    2381        111651
20090813    -178        111473
20090814    341     111814
20090817    263     112076
20090818    981     113058
20090819    1434        114492
20090820    1180        115672
20090821    1035        116707
20090824    358     117065
20090825    -3168       113897
20090826    -1113       112784
20090827    -1419       111364
20090828    1324        112689
20090831    -217        112472
20090901    -609        111863
20090902    1474        113336
20090903    1028        114365
20090904    936     115301
20090907    1900        117200
20090908    1118        118318
20090909    1202        119520
20090910    2764        122285
20090911    -1282       121002
20090914    1847        122849
20090915    1017        123866
20090916    935     124801
20090917    -1012       123789
20090918    602     124391
20090921    -625        123766
20090922    -547        123219
20090923    -1164       122055
20090924    1571        123627
20090925    1393        125019
20090928    436     125455
20090929    -166        125289
20090930    2139        127427
20091001    1289        128716
20091002    1388        130104
20091005    -105        129999
20091006    -2551       127448
20091007    -190        127258
20091008    2361        129618
20091009    791     130409
20091012    2661        133070
20091013    -146        132924
20091014    5591        138515
20091015    1055        139570
20091016    -2741       136829
20091019    1395        138224
20091020    -1881       136343
20091021    440     136782
20091022    1475        138258
20091023    -231        138027
20091026    1162        139190
20091027    -969        138221
20091028    3494        141715
20091029    -2884       138831
20091030    2642        141472
20091102    -191        141281
20091103    401     141682
20091104    -723        140960
20091105    1558        142517
20091106    -613        141904
20091109    828     142733
20091110    -668        142065
20091111    -850        141215
20091112    -154        141061
20091113    249     141310
20091116    -1774       139536
20091117    -924        138611
20091118    1252        139863
20091119    -864        138999
20091120    -1327       137672
20091123    -2055       135617
20091124    461     136078
20091125    -1574       134504
20091126    -835        133669
20091127    316     133985
20091130    837     134822
20091201    1321        136143
20091202    -861        135282
20091203    -5660       129622
20091204    2010        131632
20091207    912     132544
20091208    -8      132536
20091209    2405        134941
20091210    -852        134089
20091211    811     134900
20091214    1523        136423
20091215    616     137039
20091216    232     137271
20091217    -808        136463
20091218    -251        136212
20091221    811     137023
20091222    -535        136488
20091223    -371        136118
20091228    1248        137366
20091229    -892        136474
20091230    -55     136419
20100104    510     136928
20100105    737     137666
20100106    587     138253
20100107    1705        139958
20100108    832     140791
20100111    -948        139843
20100112    -256        139586
20100113    1200        140786
20100114    -615        140171
20100115    -405        139766
20100118    1101        140867
20100119    281     141148
20100120    -945        140204
20100121    -1979       138225
20100122    -462        137763
20100125    -1280       136483
20100126    -5185       131297
20100127    -884        130414
20100128    -365        130049
20100129    -369        129679
20100201    -1092       128588
20100202    -430        128158
20100203    -508        127650
20100204    1628        129278
20100205    921     130199
20100208    62      130262
20100209    -922        129339
20100210    1015        130354
20100211    -1000       129355
20100212    2291        131646
20100215    -1138       130508
20100216    62      130570
20100217    -1475       129095
20100218    594     129689
20100219    729     130418
20100222    -343        130075
20100223    -101        129974
20100224    854     130827
20100225    -369        130458
20100226    129     130587
20100301    1762        132349
20100302    1479        133827
20100303    1727        135555
20100304    -578        134977
20100305    1447        136423
20100308    -1551       134873
20100309    1397        136270
20100310    -1056       135214
20100311    850     136064
20100312    -2546       133518
20100315    1092        134610
20100316    -2574       132036
20100317    2811        134847
20100318    -60     134788
20100319    -37     134751
20100322    20      134771
20100323    460     135231
20100324    216     135448
20100325    1619        137067
20100326    -179        136887
20100329    830     137717
20100330    -3199       134518
20100331    -1799       132719
20100401    -1142       131576
20100406    -620        130956
20100407    0       130956
20100408    0       130956
20100409    1602        132558
20100412    353     132912
20100413    594     133505
20100414    577     134083
20100415    553     134635
20100416    1461        136097
20100419    -1548       134548
20100420    -1708       132840
20100421    -71     132770
20100422    -1766       131004
20100423    7156        138160
20100426    4505        142666
20100427    -1854       140812
20100428    -1227       139585
20100429    1109        140694
20100430    670     141364
20100503    -2792       138572
20100504    1889        140461
20100505    -835        139626
20100506    -1636       137990
20100507    128     138118
20100510    -4930       133188
20100511    1741        134929
20100512    -803        134126
20100513    2311        136437
20100514    -2623       133814
20100517    570     134384
20100518    1692        136076
20100519    -1094       134982
20100520    -2300       132682
20100521    -569        132113
20100524    48      132160
20100525    1525        133685
20100526    -2577       131108
20100527    -986        130123
20100528    -702        129420
20100531    1495        130915
20100601    -493        130422
20100602    -91     130331
20100603    494     130825
20100604    -1586       129239
20100607    458     129697
20100608    -3701       125996
20100609    2625        128621
20100610    1732        130353
20100611    -1752       128601
20100614    2890        131491
20100615    364     131855
20100616    248     132103
20100617    -465        131638
20100618    -645        130994
20100621    -1323       129670
20100622    -206        129464
20100623    170     129633
20100624    1119        130753
20100625    -404        130348
20100628    -1908       128440
20100629    736     129176
20100630    92      129268
20100701    885     130153
20100702    1443        131596
20100705    91      131687
20100706    1182        132869
20100707    -2      132867
20100708    -791        132076
20100709    328     132404
20100712    -1151       131253
20100713    1478        132731
20100714    1180        133911
20100715    -931        132980
20100716    3147        136127
20100719    -1421       134706
20100720    -823        133883
20100721    480     134363
20100722    1398        135761
20100723    1189        136951
20100726    163     137113
20100727    -1420       135693
20100728    1186        136879
20100729    1994        138873
20100730    -1087       137786
20100802    -821        136966
20100803    -166        136799
20100804    1899        138699
20100805    -2154       136545
20100806    -1178       135366
20100809    1397        136763
20100810    -430        136334
20100811    -229        136104
20100812    670     136774
20100813    530     137304
20100816    624     137929
20100817    -832        137096
20100818    170     137266
20100819    -2130       135136
20100820    215     135351
20100823    539     135890
20100824    1099        136989
20100825    -427        136562
20100826    -1033       135529
20100827    478     136007
20100830    -593        135414
20100831    1338        136752
20100901    1784        138535
20100902    -874        137661
20100903    104     137766
20100906    -1673       136092
20100907    -330        135763
20100908    -377        135385
20100909    -1388       133998
20100910    645     134643
20100913    41      134684
20100914    2123        136807
20100915    -289        136518
20100916    3515        140033
20100917    970     141004
20100920    2108        143111
20100921    410     143521
20100922    -1910       141611
20100923    -193        141418
20100924    -3463       137955
20100927    0       137955
20100928    0       137955
20100929    0       137955
20100930    0       137955
20101001    0       137955
20101004    876     138831
20101005    -957        137874
20101006    -2043       135831
20101007    1400        137231
20101008    -1164       136067
20101011    89      136156
20101012    -2067       134089
20101013    2048        136136
20101014    -19     136117
20101015    -494        135623
20101018    -312        135311
20101019    199     135510
20101020    -1424       134086
20101021    -579        133507
20101022    -27     133480
20101025    428     133908
20101026    1231        135138
20101027    1766        136904
20101028    -387        136518
20101029    1000        137518
20101101    -716        136802
20101102    -73     136729
20101103    298     137027
20101104    -1138       135889
20101105    990     136879
20101108    2738        139617
20101109    206     139823
20101110    -3267       136556
20101111    4067        140623
20101112    1470        142093
20101115    -513        141580
20101116    -1654       139926
20101117    -521        139405
20101118    -984        138421
20101119    -252        138169
20101122    -374        137796
20101123    353     138149
20101124    -1781       136368
20101125    846     137213
20101126    -427        136787
20101129    77      136864
20101130    -3      136861
20101201    2978        139839
20101202    2570        142409
20101203    -437        141972
20101206    985     142958
20101207    1558        144515
20101208    -857        143658
20101209    -3368       140291
20101210    -837        139453
20101213    182     139636
20101214    333     139968
20101215    -3387       136581
20101216    0       136581
20101217    0       136581
20101220    1239        137819
20101221    -373        137446
20101222    -713        136733
20101223    803     137535
20101227    -16     137520
20101228    -765        136755
20101229    65      136820
20101230    -1688       135132
20110103    -336        134796
20110104    3070        137866
20110105    2524        140390
20110106    730     141119
20110107    -631        140489
20110110    -391        140098
20110111    -2308       137790
20110112    -863        136927
20110113    -3233       133694
20110114    0       133694
20110117    -1164       132530
20110118    1579        134109
20110119    -961        133148
20110120    4029        137177
20110121    -1153       136024
20110124    -2623       133401
20110125    -1764       131637
20110126    1884        133521
20110127    684     134204
20110128    -475        133730
20110131    -115        133615
20110201    -160        133455
20110202    -1759       131696
20110203    146     131842
20110204    -121        131721
20110207    -867        130854
20110208    -620        130235
20110209    333     130567
20110210    793     131361
20110211    -1102       130259
20110214    -948        129311
20110215    367     129678
20110216    3691        133369
20110217    91      133459
20110218    107     133567
20110221    -679        132887
20110222    -1806       131081
20110223    2410        133491
20110224    -6532       126959
20110225    0       126959
20110228    4272        131231
20110301    1       131232
20110302    -565        130667
20110303    694     131361
20110304    -222        131139
20110307    -474        130665
20110308    -654        130011
20110309    -141        129870
20110310    1840        131710
20110311    1805        133515
20110314    -3264       130251
20110315    -2615       127636
20110316    -350        127287
20110317    2185        129472
20110318    804     130276
20110321    2549        132825
20110322    -1826       130999
20110323    -308        130691
20110324    560     131250
20110325    271     131521
20110328    347     131869
20110329    489     132358
20110330    607     132965
20110331    1108        134072
20110401    1360        135432
20110404    -2800       132632
20110405    1433        134065
20110406    -425        133640
20110407    1696        135336
20110408    939     136275
20110411    1156        137431
20110412    1427        138858
20110413    132     138990
20110414    -530        138460
20110415    -2522       135938
20110418    -871        135067
20110419    1020        136086
20110420    556     136643
20110421    7651        144293
20110426    280     144573
20110427    489     145062
20110428    -440        144623
20110429    -335        144288
20110502    -553        143735
20110503    189     143924
20110504    1811        145735
20110505    -275        145461
20110506    -711        144750
20110509    -314        144436
20110510    -6      144430
20110511    528     144958
20110512    -101        144857
20110513    894     145751
20110516    -1692       144059
20110517    -730        143329
20110518    -245        143085
20110519    2370        145455
20110520    -1161       144294
20110523    400     144693
20110524    339     145032
20110525    -2681       142351
20110526    -459        141893
20110527    -573        141319
20110530    -2144       139175
20110531    2341        141516
20110601    -739        140777
20110602    432     141210
20110603    3898        145108
20110606    -105        145003
20110607    -1912       143091
20110608    -755        142335
20110609    -890        141446
20110610    -356        141090
20110613    54      141143
20110614    -190        140953
20110615    -2034       138919
20110616    1422        140341
20110617    -181        140160
20110620    1160        141320
20110621    48      141368
20110622    -1410       139959
20110623    -1553       138406
20110624    -911        137495
20110627    -829        136666
20110628    -2144       134523
20110629    -1108       133415
20110630    6       133421
20110701    1355        134776
20110704    1399        136176

• Don't forget to vote on helpful answers (you now have enough rep). – chl Aug 5 '11 at 12:50

Convert your series to day-to-day returns, and use the package PerformanceAnalytics in R.

I saved your attached data as a .csv file on my desktop. Here's some R code demonstrating how you could evaluate this trading strategy. Keep in mind that if you have any "look-ahead" or "data-snooping" bias in your trading model, all of these stats are worse than useless. Make sure that any simulated optimization/trading decisions in the backtest made at time t(n) are based solely on information available at t(1)-t(n-1).

#Load Data
setwd('~/Desktop')

#Setup as a time series
library(quantmod)
Date <- as.Date(as.character(PL$DBDate),format='%Y%m%d') PL <- xts(PL[,c('PeriodToPeriodPL','Accumulation')],order.by=Date) PL <- na.omit(PL) #Pretend we start with$100,000
PL$Accumulation <- PL$Accumulation+100000

#Calculate Day-to-Day percent returns
Returns <- dailyReturn(PL\$Accumulation, type = "arithmetic")

#Get SPY data to compare to
getSymbols('SPY',from=min(index(Returns)),to=max(index(Returns)))
BenchmarkReturns <- dailyReturn(Cl(SPY), type = "arithmetic")

#Setup for Performance Metrics
library(PerformanceAnalytics)
MeVSspy <- cbind(Returns,BenchmarkReturns)
names(MeVSspy) <- c('Me','SPY')

#Basic Performance Metrics
charts.PerformanceSummary(MeVSspy)
table.AnnualizedReturns(MeVSspy, geometric=FALSE)

#Information ratio vs SPY
InformationRatio(Returns,BenchmarkReturns)

#Look at worst drawdowns
table.Drawdowns(Returns)
table.Drawdowns(BenchmarkReturns)

#Rolling 30-day performance
charts.RollingPerformance(MeVSspy, width = 30)

?PerformanceAnalytics


Here's some of the output:

                              Me    SPY
Annualized Return         0.1911 0.0469
Annualized Std Dev        0.1765 0.2505
Annualized Sharpe (Rf=0%) 1.0825 0.1873


Performance vs. SPY (SPY in RED)

Rolling Performance over the past 30-days. Gives you some idea of volatility:

Keep in mind that all these stats are just stats, past results are in no way indicative of futures results, and that none of the above information should be taken as investment advice.

• @user369122: If my answer works for you, feel free to upvote it or mark it as accepted. – Zach Aug 4 '11 at 20:03

In general, in the markets, a mechanical trading system that has out-performed in the past, tends to under-perform in the future. If you're really lucky, then previous out-performance is just statistical noise, and your future performance is in line with the market.

In short, to your question "How can I calculate the change that over an X period of time, the strategy will, with a certain percentage of reliability) make money.", the answer is that you can't, and it probably won't: to calculate the probabilities, you need forward information about the markets, which you don't have; so you have to make a set of assumptions just to get the calculation to run: but at least one of those assumptions will be invalid, thus invalidating your calculation. If you want to minimize your chance of going broke, keep your maximum stake size at below 1% of your pot, for any individual trade: trading is a markov chain with an absorbing state at zero, and the trick is to avoid that state.

If you're in the top 1% of financial quants in the world, with access to the fastest sources of relevant information, can inject orders into the system as fast as any of the big players, and can access all their dark pools of liquidity, then your mechanical trading strategy may perform as well in the future as it did in the past, until others hit on how you're doing it, and copy it, diluting your returns. [edit:] In the OP's case, as a trader with all that access, then @Zach's suggestion of the R package Performance Analytics looks very promising. And I'd also suggest sub-sampling fixed-length intervals (e.g. 125-point) at random from the back-tested results, and looking at the statistics of the results: that is to say, pick a lot of dates at random from the range for which you have data: select uniformly on the range from the first date, to 124 days before the end date. For each interval, create a data point calculated as the net change in accumulated Profit & Loss between start and end dates. Then look at the mean, variance, skew, kurtosis of that set of data points. That might be useful: but only because the back-tested results were not used for calibrating the trading algorithm [end edit]

• well..thanks for your thoughts..but I'm already active as a trader for about 10 year and work for a successful company. I can understand your thoughts, but it doesn't really account for the strategies I currently work on or have been working on in the past. But uh, just looking at the numbers and my question, can you help me out? – user369122 Aug 4 '11 at 19:35
• OK: of the 1250 points, how much was used for designing the algo? Are older data available to backtest further? If so, you could randomly sample 125-day and 250-day sequences within the data you didn't use for calibration, and look at the distribution of P&Ls across those intervals. (if you're happy to assume some persistence in variance over time ... (paging Nassim Taleb ...) – 410 gone Aug 4 '11 at 19:50
• +1 for a good answer but it seems misleading to me to suggest that we should hope that our algorithm's previous success was luck rather than skill. – Michael Bishop Aug 4 '11 at 21:04
• @Michael Bishop - for almost all readers of the answer, those in profit will be there due to luck rather than skill. For the tiny minority of readers, such as Matthijs, who are professionals, then it is different: that's what I tried to cover in my paragraph on quants, above. – 410 gone Aug 5 '11 at 6:07
• @RockScience Yes: and it's also a resource for the whole web public. The audience is much much wider than quants. If this were a private forum for a quant-only audience, then I'd have given a very different answer. – 410 gone Aug 5 '11 at 11:18