SlideShare a Scribd company logo
1 of 110
Download to read offline
Trading
with open source tools

         Chia-liang Kao
        clkao@clkao.org

      OSDC.TW 2009 Taipei
Caution
Caution
              There is
ABSOLUTELY NO WARRANTY
   if you use any of the code or
  strategy mentioned in this talk.
Presenting.......
Presenting.......

The OSDC Trading System
Presenting.......

The OSDC Trading System
       using dice!
Take #1
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
              {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade
Take #1
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
              {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade


                        Long Signal
Take #1      (Random returns 0..5)

SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
              {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade


                          Long Signal
Take #1
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
              {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade


                        Long Signal
Take #1
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
              {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade


                       Short Signal
Take #1
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
              {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade


                       Enters at 08:50
Take #1
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
              {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade
Take #1
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
              {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade




  % perl backtest.pl --start=2001-01-01 --end=2007-12-31
         --timeframe 5min --money-management='FixedShares 1'
                          OSDC1 TX
Take #1
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
              {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade


                  Taiwan Weighted Futures
                      1 point = nt$200

  % perl backtest.pl --start=2001-01-01 --end=2007-12-31
         --timeframe 5min --money-management='FixedShares 1'
                          OSDC1 TX
Take #1
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
              {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade
Take #1
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
              {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade

-----------------------------------------------------
Performance : -199.1 ( nan%)     Buy & Hold : 77.5% ( 14.2%) () => by year
MaxDrawDown :      201.6% B&H MaxDrawDown :     44.8%
Best performance :   3.3% Worst performance : -204.9
Net gain :      -19910.00 Gross gain :       -2590.00

Trades statistics :
Number of trades :    1732   Trades/Year :      247.97
Number of gains :      698   Number of losses :   1034   Win. ratio :   40.3%
Max consec. win :        7   Max consec. loss :     13   Expectancy :   -0.00
Average gain :       0.87%   Average loss :     -0.94%   Avg. perf :     nan%
Biggest gain :       6.44%   Biggest loss :     -6.65%   Profit fac :    0.92
Sum of gains :    36090.00   Sum of losses : -56000.00   Risk of ruin : 100.0
Take #1
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
              {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade

-----------------------------------------------------
Performance : -199.1 ( nan%)     Buy & Hold : 77.5% ( 14.2%) () => by year
MaxDrawDown :      201.6% B&H MaxDrawDown :     44.8%
Best performance :   3.3% Worst performance : -204.9
Net gain :      -19910.00 Gross gain :       -2590.00

Trades statistics :
Number of trades :    1732   Trades/Year :      247.97
Number of gains :      698   Number of losses :   1034   Win. ratio :   40.3%
Max consec. win :        7   Max consec. loss :     13   Expectancy :   -0.00
Average gain :       0.87%   Average loss :     -0.94%   Avg. perf :     nan%
Biggest gain :       6.44%   Biggest loss :     -6.65%   Profit fac :    0.92
Sum of gains :    36090.00   Sum of losses : -56000.00   Risk of ruin : 100.0
Take #1
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
              {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade

-----------------------------------------------------
Performance : -199.1 ( nan%)     Buy & Hold : 77.5% ( 14.2%) () => by year
MaxDrawDown :      201.6% B&H MaxDrawDown :     44.8%
Best performance :   3.3% Worst performance : -204.9
                              -NT$3,982,000
Net gain :      -19910.00 Gross gain :       -2590.00

Trades statistics :
Number of trades :    1732   Trades/Year :      247.97
Number of gains :      698   Number of losses :   1034   Win. ratio :   40.3%
Max consec. win :        7   Max consec. loss :     13   Expectancy :   -0.00
Average gain :       0.87%   Average loss :     -0.94%   Avg. perf :     nan%
Biggest gain :       6.44%   Biggest loss :     -6.65%   Profit fac :    0.92
Sum of gains :    36090.00   Sum of losses : -56000.00   Risk of ruin : 100.0
Take #1
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
              {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade

-----------------------------------------------------
Performance : -199.1 ( nan%)     Buy & Hold : 77.5% ( 14.2%) () => by year
MaxDrawDown :      201.6% B&H MaxDrawDown :     44.8%
Best performance :   3.3% Worst performance : -204.9
                              -NT$3,982,000
Net gain :      -19910.00 Gross gain :       -2590.00

Trades statistics :
Number of trades :    1732   Trades/Year :      247.97
Number of gains :      698   Number of losses :   1034   Win. ratio :   40.3%
Max consec. win :        7   Max consec. loss :     13   Expectancy :   -0.00
Average gain :       0.87%   Average loss :     -0.94%   Avg. perf :     nan%
Biggest gain :       6.44%   Biggest loss :     -6.65%   Profit fac :    0.92
Sum of gains :    36090.00   Sum of losses : -56000.00   Risk of ruin : 100.0
                                                              DOOMED!!
Take #2
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade 
 |CS:Stop:Fixed 1.5
Take #2
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade 
                        Stop when losing 1.5%
 |CS:Stop:Fixed 1.5
Take #2
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade 
 |CS:Stop:Fixed 1.5
Take #2
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade 
 |CS:Stop:Fixed 1.5
-----------------------------------------------------
Performance : -124.4 ( nan%)     Buy & Hold : 77.5% ( 14.2%) () => by year
MaxDrawDown :      136.8% B&H MaxDrawDown :     44.8%
Best performance :   2.0% Worst performance : -137.5
Net gain :      -12442.13 Gross gain :        4877.87

Trades statistics :
Number of trades :    1732   Trades/Year :      247.97
Number of gains :      715   Number of losses :   1017   Win. ratio :   41.3%
Max consec. win :       11   Max consec. loss :     16   Expectancy :   -0.00
Average gain :       0.88%   Average loss :     -0.83%   Avg. perf :     nan%
Biggest gain :       5.67%   Biggest loss :     -1.79%   Profit fac :    1.05
Sum of gains :    37037.00   Sum of losses : -49479.13   Risk of ruin : 100.0
Take #2
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade 
 |CS:Stop:Fixed 1.5
-----------------------------------------------------
Performance : -124.4 ( nan%)     Buy & Hold : 77.5% ( 14.2%) () => by year
MaxDrawDown :      136.8% B&H MaxDrawDown :     44.8%
Best performance :   2.0% Worst performance : -137.5
                              -NT$2,488,426
Net gain :      -12442.13 Gross gain :        4877.87

Trades statistics :
Number of trades :    1732   Trades/Year :      247.97
Number of gains :      715   Number of losses :   1017   Win. ratio :   41.3%
Max consec. win :       11   Max consec. loss :     16   Expectancy :   -0.00
Average gain :       0.88%   Average loss :     -0.83%   Avg. perf :     nan%
Biggest gain :       5.67%   Biggest loss :     -1.79%   Profit fac :    1.05
Sum of gains :    37037.00   Sum of losses : -49479.13   Risk of ruin : 100.0
Take #2
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade 
 |CS:Stop:Fixed 1.5
-----------------------------------------------------
Performance : -124.4 ( nan%)     Buy & Hold : 77.5% ( 14.2%) () => by year
MaxDrawDown :      136.8% B&H MaxDrawDown :     44.8%
Best performance :   2.0% Worst performance : -137.5
                              -NT$2,488,426
Net gain :      -12442.13 Gross gain :        4877.87

Trades statistics :
Number of trades :    1732   Trades/Year :      247.97
Number of gains :      715   Number of losses :   1017   Win. ratio :   41.3%
Max consec. win :       11   Max consec. loss :     16   Expectancy :   -0.00
Average gain :       0.88%   Average loss :     -0.83%   Avg. perf :     nan%
Biggest gain :       5.67%   Biggest loss :     -1.79%   Profit fac :    1.05
Sum of gains :    37037.00   Sum of losses : -49479.13   Risk of ruin : 100.0

                    Much better, but still negative
Take #3
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade 
 |CS:Stop:Fixed 2.5
Take #3
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade 
                        Stop when losing 2.5%
 |CS:Stop:Fixed 2.5
Take #3
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade 
 |CS:Stop:Fixed 2.5
Take #3
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade 
 |CS:Stop:Fixed 2.5
-----------------------------------------------------
Performance : -149.8 ( nan%)     Buy & Hold : 77.5% ( 14.2%) () => by year
MaxDrawDown :      155.0% B&H MaxDrawDown :     44.8%
Best performance :   0.0% Worst performance : -155.0
Net gain :      -14977.47 Gross gain :        2342.53

Trades statistics :
Number of trades :    1732   Trades/Year :      247.97
Number of gains :      706   Number of losses :   1026   Win. ratio :   40.8%
Max consec. win :        8   Max consec. loss :     14   Expectancy :   -0.00
Average gain :       0.91%   Average loss :     -0.87%   Avg. perf :     nan%
Biggest gain :       6.29%   Biggest loss :     -2.78%   Profit fac :    1.05
Sum of gains :    37749.00   Sum of losses : -52726.47   Risk of ruin : 100.0
Take #3
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade 
 |CS:Stop:Fixed 2.5
-----------------------------------------------------
Performance : -149.8 ( nan%)     Buy & Hold : 77.5% ( 14.2%) () => by year
MaxDrawDown :      155.0% B&H MaxDrawDown :     44.8%
Best performance :   0.0% Worst performance : -155.0
                              -NT$2,995,494
Net gain :      -14977.47 Gross gain :        2342.53

Trades statistics :
Number of trades :    1732   Trades/Year :      247.97
Number of gains :      706   Number of losses :   1026   Win. ratio :   40.8%
Max consec. win :        8   Max consec. loss :     14   Expectancy :   -0.00
Average gain :       0.91%   Average loss :     -0.87%   Avg. perf :     nan%
Biggest gain :       6.29%   Biggest loss :     -2.78%   Profit fac :    1.05
Sum of gains :    37749.00   Sum of losses : -52726.47   Risk of ruin : 100.0
Take #3
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:DayTrade 
 |CS:Stop:Fixed 2.5
-----------------------------------------------------
Performance : -149.8 ( nan%)     Buy & Hold : 77.5% ( 14.2%) () => by year
MaxDrawDown :      155.0% B&H MaxDrawDown :     44.8%
Best performance :   0.0% Worst performance : -155.0
                              -NT$2,995,494
Net gain :      -14977.47 Gross gain :        2342.53

Trades statistics :
Number of trades :    1732   Trades/Year :      247.97
Number of gains :      706   Number of losses :   1026   Win. ratio :   40.8%
Max consec. win :        8   Max consec. loss :     14   Expectancy :   -0.00
Average gain :       0.91%   Average loss :     -0.87%   Avg. perf :     nan%
Biggest gain :       6.29%   Biggest loss :     -2.78%   Profit fac :    1.05
Sum of gains :    37749.00   Sum of losses : -52726.47   Risk of ruin : 100.0


          Not better after increase the stop threshold
Take #4
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:Stop:Fixed 5 
 |CS:CloseGain 10
Take #4
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:Stop:Fixed 5 
                        Stop when winning 10%
 |CS:CloseGain 10
Take #4
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:Stop:Fixed 5 
 |CS:CloseGain 10
Take #4
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:Stop:Fixed 5 
 |CS:CloseGain 10
-----------------------------------------------------
Performance : 29.2% ( 6.1%)      Buy & Hold : 77.5% ( 14.2%) () => by year
MaxDrawDown :       24.9% B&H MaxDrawDown :     44.8%
Best performance : 49.7% Worst performance : -1.2%
Net gain :        2920.65 Gross gain :        3730.65

Trades statistics :
Number of trades :      81   Trades/Year :       11.60
Number of gains :       32   Number of losses :     49   Win. ratio :   39.5%
Max consec. win :        4   Max consec. loss :      8   Expectancy :    0.01
Average gain :       9.92%   Average loss :     -5.43%   Avg. perf :    0.32%
Biggest gain :      11.50%   Biggest loss :     -9.73%   Profit fac :    1.83
Sum of gains :    18313.10   Sum of losses : -15392.45   Risk of ruin : 21.3%
Take #4
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:Stop:Fixed 5 
 |CS:CloseGain 10
-----------------------------------------------------
Performance : 29.2% ( 6.1%)      Buy & Hold : 77.5% ( 14.2%) () => by year
MaxDrawDown :       24.9% B&H MaxDrawDown :     44.8%
Best performance : 49.7% Worst performance : -1.2%
                                NT$584,130
Net gain :        2920.65 Gross gain :        3730.65

Trades statistics :
Number of trades :      81   Trades/Year :       11.60
Number of gains :       32   Number of losses :     49   Win. ratio :   39.5%
Max consec. win :        4   Max consec. loss :      8   Expectancy :    0.01
Average gain :       9.92%   Average loss :     -5.43%   Avg. perf :    0.32%
Biggest gain :      11.50%   Biggest loss :     -9.73%   Profit fac :    1.83
Sum of gains :    18313.10   Sum of losses : -15392.45   Risk of ruin : 21.3%
Take #4
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:Stop:Fixed 5 
 |CS:CloseGain 10
-----------------------------------------------------
Performance : 29.2% ( 6.1%)      Buy & Hold : 77.5% ( 14.2%) () => by year
MaxDrawDown :       24.9% B&H MaxDrawDown :     44.8%
Best performance : 49.7% Worst performance : -1.2%
                                NT$584,130
Net gain :        2920.65 Gross gain :        3730.65

Trades statistics :
Number of trades :      81   Trades/Year :       11.60
                                  PROFIT!!
Number of gains :       32   Number of losses :     49   Win. ratio :   39.5%
Max consec. win :        4   Max consec. loss :      8   Expectancy :    0.01
Average gain :       9.92%   Average loss :     -5.43%   Avg. perf :    0.32%
Biggest gain :      11.50%   Biggest loss :     -9.73%   Profit fac :    1.83
Sum of gains :    18313.10   Sum of losses : -15392.45   Risk of ruin : 21.3%
Take #5
SY:Generic 
  {I:G:Eval ( {I:LastTrade} ?   {I:LastTrade}==1
                            :   {S:G:Above {I:Random 6} 2})}
  {I:G:Eval ( {I:LastTrade} ?   {I:LastTrade}==-1
                            :   {S:G:Below {I:Random 6} 3})}
 |TF:Generic {S:G:CrossOverUp   {I:Hour} 850} 
             {S:G:CrossOverUp   {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:Stop:Fixed 5 
 |CS:CloseGain 10
Take #5
SY:Generic 
  {I:G:Eval ( {I:LastTrade} ? {I:LastTrade}==1
                            : {S:G:Above {I:Random 6} 2})}
  {I:G:Eval ( {I:LastTrade} ? {I:LastTrade}==-1
                            : {S:G:Below {I:Random 6} 3})}
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
                          Following results from last trade
 |CS:Stop:Fixed 5 
 |CS:CloseGain 10
Take #5
SY:Generic 
  {I:G:Eval ( {I:LastTrade} ?   {I:LastTrade}==1
                            :   {S:G:Above {I:Random 6} 2})}
  {I:G:Eval ( {I:LastTrade} ?   {I:LastTrade}==-1
                            :   {S:G:Below {I:Random 6} 3})}
 |TF:Generic {S:G:CrossOverUp   {I:Hour} 850} 
             {S:G:CrossOverUp   {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:Stop:Fixed 5 
 |CS:CloseGain 10
Take #5
SY:Generic 
  {I:G:Eval ( {I:LastTrade} ?         {I:LastTrade}==1
                            :         {S:G:Above {I:Random 6} 2})}
  {I:G:Eval ( {I:LastTrade} ?         {I:LastTrade}==-1
                            :         {S:G:Below {I:Random 6} 3})}
 |TF:Generic {S:G:CrossOverUp         {I:Hour} 850} 
             {S:G:CrossOverUp         {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:Stop:Fixed 5 
 |CS:CloseGain 10
-----------------------------------------------------
Performance : 48.4% ( 9.5%)      Buy & Hold : 77.5% ( 14.2%) () => by year
MaxDrawDown :       19.8% B&H MaxDrawDown :     44.8%
Best performance : 49.5% Worst performance :     0.0%
Net gain :        4839.75 Gross gain :        5699.75

Trades statistics :
Number of trades :      86   Trades/Year :        12.31
Number of gains :       36   Number of losses :      50   Win. ratio :   41.9%
Max consec. win :        4   Max consec. loss :       8   Expectancy :    0.01
Average gain :       9.72%   Average loss :      -5.48%   Avg. perf :    0.46%
Biggest gain :      10.71%   Biggest loss :     -11.33%   Profit fac :    1.77
Sum of gains :    20674.70   Sum of losses : -15834.95    Risk of ruin : 9.9%
Take #5
SY:Generic 
  {I:G:Eval ( {I:LastTrade} ?         {I:LastTrade}==1
                            :         {S:G:Above {I:Random 6} 2})}
  {I:G:Eval ( {I:LastTrade} ?         {I:LastTrade}==-1
                            :         {S:G:Below {I:Random 6} 3})}
 |TF:Generic {S:G:CrossOverUp         {I:Hour} 850} 
             {S:G:CrossOverUp         {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:Stop:Fixed 5 
 |CS:CloseGain 10
-----------------------------------------------------
Performance : 48.4% ( 9.5%)      Buy & Hold : 77.5% ( 14.2%) () => by year
MaxDrawDown :       19.8% B&H MaxDrawDown :     44.8%
Best performance : 49.5% Worst performance :     0.0%
                                NT$967,950
Net gain :        4839.75 Gross gain :        5699.75

Trades statistics :
Number of trades :      86   Trades/Year :        12.31
Number of gains :       36   Number of losses :      50   Win. ratio :   41.9%
Max consec. win :        4   Max consec. loss :       8   Expectancy :    0.01
Average gain :       9.72%   Average loss :      -5.48%   Avg. perf :    0.46%
Biggest gain :      10.71%   Biggest loss :     -11.33%   Profit fac :    1.77
Sum of gains :    20674.70   Sum of losses : -15834.95    Risk of ruin : 9.9%
The OSDC Trading System
     Got your dice?
SY:Generic 
  {I:G:Eval ( {I:LastTrade} ?         {I:LastTrade}==1
                            :         {S:G:Above {I:Random 6} 2})}
  {I:G:Eval ( {I:LastTrade} ?         {I:LastTrade}==-1
                            :         {S:G:Below {I:Random 6} 3})}
 |TF:Generic {S:G:CrossOverUp         {I:Hour} 850} 
             {S:G:CrossOverUp         {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:Stop:Fixed 5 
 |CS:CloseGain 10
-----------------------------------------------------
Performance : 48.4% ( 9.5%)      Buy & Hold : 77.5% ( 14.2%) () => by year
MaxDrawDown :       19.8% B&H MaxDrawDown :     44.8%
Best performance : 49.5% Worst performance :     0.0%
Net gain :        4839.75 Gross gain :        5699.75

Trades statistics :
Number of trades :      86   Trades/Year :        12.31
Number of gains :       36   Number of losses :      50   Win. ratio :   41.9%
Max consec. win :        4   Max consec. loss :       8   Expectancy :    0.01
Average gain :       9.72%   Average loss :      -5.48%   Avg. perf :    0.46%
Biggest gain :      10.71%   Biggest loss :     -11.33%   Profit fac :    1.77
Sum of gains :    20674.70   Sum of losses : -15834.95    Risk of ruin : 9.9%
SY:Generic 
  {I:G:Eval ( {I:LastTrade} ?         {I:LastTrade}==1
                            :         {S:G:Above {I:Random 6} 2})}
  {I:G:Eval ( {I:LastTrade} ?         {I:LastTrade}==-1
                            :         {S:G:Below {I:Random 6} 3})}
 |TF:Generic {S:G:CrossOverUp         {I:Hour} 850} 
             {S:G:CrossOverUp         {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:Stop:Fixed 5 
 |CS:CloseGain 10
-----------------------------------------------------
Performance : 48.4% ( 9.5%)      Buy & Hold : 77.5% ( 14.2%) () => by year
MaxDrawDown :       19.8% B&H MaxDrawDown :     44.8%
Best performance : 49.5% Worst performance :     0.0%
Net gain :        4839.75 Gross gain :        5699.75

Trades statistics :
Number of trades :      86   Trades/Year :        12.31
Number of gains :       36   Number of losses :      50   Win. ratio :   41.9%
Max consec. win :        4   Max consec. loss :       8   Expectancy :    0.01
Average gain :       9.72%   Average loss :      -5.48%   Avg. perf :    0.46%
Biggest gain :      10.71%   Biggest loss :     -11.33%   Profit fac :    1.77
Sum of gains :    20674.70   Sum of losses : -15834.95    Risk of ruin : 9.9%
SY:Generic 
  {I:G:Eval ( {I:LastTrade} ?         {I:LastTrade}==1
                            :         {S:G:Above {I:Random 6} 2})}
  {I:G:Eval ( {I:LastTrade} ?         {I:LastTrade}==-1
                            :         {S:G:Below {I:Random 6} 3})}
 |TF:Generic {S:G:CrossOverUp         {I:Hour} 850} 
             {S:G:CrossOverUp         {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:Stop:Fixed 5 
 |CS:CloseGain 10
-----------------------------------------------------
Performance : 48.4% ( 9.5%)      Buy & Hold : 77.5% ( 14.2%) () => by year
MaxDrawDown :       19.8% B&H MaxDrawDown :     44.8%
Best performance : 49.5% Worst performance :     0.0%
Net gain :        4839.75 Gross gain :        5699.75

Trades statistics :
Number of trades :      86   Trades/Year :        12.31
Number of gains :       36   Number of losses :      50   Win. ratio :   41.9%
Max consec. win :        4   Max consec. loss :       8   Expectancy :    0.01
Average gain :       9.72%   Average loss :      -5.48%   Avg. perf :    0.46%
Biggest gain :      10.71%   Biggest loss :     -11.33%   Profit fac :    1.77
Sum of gains :    20674.70   Sum of losses : -15834.95    Risk of ruin : 9.9%
Outline

• trading system
• analysis
• backtesting
• live trading
Trading System

Trading system, also known as algorithmic trading, is the use of
computer programs for entering trading orders with the computer
algorithm deciding on certain aspects of the order such as the
timing, price, quantity of order
Trading System

Trading system, also known as algorithmic trading, is the use of
computer programs for entering trading orders with the computer
algorithm deciding on certain aspects of the order such as the
timing, price, quantity of order




                     Even with dice
Analysis

• Where are all the loss coming from?
• Any interesting correlation with technical
  indicators?

• (Be curious and ask yourself questions about your
  results)
R is a programming language and software environment for
statistical computing and graphics. It is an implementation
of the S programming language with lexical scoping
semantics inspired by Scheme.
R is a programming language and software environment for
statistical computing and graphics. It is an implementation
of the S programming language with lexical scoping
semantics inspired by Scheme.




to work with numbers, vectors efficiently
winamount <- xtabs(paste(quot;profit~quot;, rhs,
sep=quot;quot;), data=data[data$profit>0,])
         loseamount <- xtabs(paste(quot;profit~quot;, rhs,
sep=quot;quot;), data=data[data$profit<=0,]);
         x$netgain <- winamount+loseamount;
         x$avgnet <- x$netgain/trade
winamount <- xtabs(paste(quot;profit~quot;, rhs,
sep=quot;quot;), data=data[data$profit>0,])
         loseamount <- xtabs(paste(quot;profit~quot;, rhs,
sep=quot;quot;), data=data[data$profit<=0,]);
         x$netgain <- winamount+loseamount;
         x$avgnet <- x$netgain/trade
winamount <- xtabs(paste(quot;profit~quot;, rhs,
sep=quot;quot;), data=data[data$profit>0,])
         loseamount <- xtabs(paste(quot;profit~quot;, rhs,
sep=quot;quot;), data=data[data$profit<=0,]);
         x$netgain <- winamount+loseamount;
         x$avgnet <- x$netgain/trade
Now if we don’t short when we are above the
                open price....
Now if we don’t short when we are above the
                open price....




           Was 5699
R also supports nice plotting
Backtesting
Backtesting
• If you want to write a strategy (which
  might not be using dice), you want to test it
  for historical data
Backtesting
• If you want to write a strategy (which
  might not be using dice), you want to test it
  for historical data
• “past performance does not guarantee
  future results”
Backtesting
• If you want to write a strategy (which
  might not be using dice), you want to test it
  for historical data
• “past performance does not guarantee
  future results”
• But if your past performance is bad, do you
  dare to use the system?
Genius Trader
SY:Generic
  {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} 
 |TF:Generic {S:G:CrossOverUp {I:Hour} 850} 
             {S:G:CrossOverUp {I:Hour} 850} 
 |TF:MaxOpenTrades 1 
 |CS:Stop:Fixed 5 
 |CS:CloseGain 10




    • Modular
    • Flexible
    • Open source
    • does backtesting, charting
live trading
live trading
• Data feed
live trading
• Data feed
• Strategy / System runner
live trading
• Data feed
• Strategy / System runner
• Broker API
live trading
• Data feed
• Strategy / System runner
• Broker API
• Infrastructure
 • Monitor
 • Scale and redundancy!
Data feed
• free: DDE from broker’s software
• Win32::DDE (polling)
• publish to memcached (or more
  appropriate message queues)
• 10 lines of code
• 20 lines for reconnect and robustness
Strategy runner
Strategy runner

• genius trader, available for back test
Strategy runner

• genius trader, available for back test
• GT::Stream, accept streaming data and
  applies trading system to generate real time
  signals
Strategy runner

• genius trader, available for back test
• GT::Stream, accept streaming data and
  applies trading system to generate real time
  signals
• available at: ????
Infrastructure

• VirtualBox headless & MicroXP
• memcached
• gearman
• nagios
Trading platforms

• http://geniustrade.org/
• Trade Station (proprietary)
• http://ojts.sourceforge.net/
• http://www.marketcetera.org/
Library


• quantlib
• ta-lib
R tutorials


• Econometrics in R (Grant V. Farnsworth)
• Practical Regression and Anova using R
  (Julian J. Faraway)
Conclusion
2009
Yesterday... I went to hotsprings in the morning..
Yesterday... I went to hotsprings in the morning..
At 11:45:20
At 11:45:20
At 11:45:20
At 11:45:20
At 11:45:20
At 11:45:20
At 11:45:20
At 11:45:20




PROFIT!!
PROFIT!!
Questions?
 clkao@clkao.org
Trading With Open Source Tools

More Related Content

What's hot

Data-Intensive Workflows with DAOS
Data-Intensive Workflows with DAOSData-Intensive Workflows with DAOS
Data-Intensive Workflows with DAOSJohann Lombardi
 
MySQL Performance Tuning: Top 10 Tips
MySQL Performance Tuning: Top 10 TipsMySQL Performance Tuning: Top 10 Tips
MySQL Performance Tuning: Top 10 TipsOSSCube
 
Nat, List and Option Monoids - from scratch - Combining and Folding - an example
Nat, List and Option Monoids -from scratch -Combining and Folding -an exampleNat, List and Option Monoids -from scratch -Combining and Folding -an example
Nat, List and Option Monoids - from scratch - Combining and Folding - an examplePhilip Schwarz
 
Peeking inside the engine of ZIO SQL.pdf
Peeking inside the engine of ZIO SQL.pdfPeeking inside the engine of ZIO SQL.pdf
Peeking inside the engine of ZIO SQL.pdfJaroslavRegec1
 
Reverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading SkillsReverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading SkillsAsuka Nakajima
 
How to Take Advantage of Optimizer Improvements in MySQL 8.0
How to Take Advantage of Optimizer Improvements in MySQL 8.0How to Take Advantage of Optimizer Improvements in MySQL 8.0
How to Take Advantage of Optimizer Improvements in MySQL 8.0Norvald Ryeng
 
UTP(UML Testing Profile)概要紹介
UTP(UML Testing Profile)概要紹介UTP(UML Testing Profile)概要紹介
UTP(UML Testing Profile)概要紹介Noriyuki Mizuno
 
PHP Version Up と AWS への移行
PHP Version Up と AWS への移行PHP Version Up と AWS への移行
PHP Version Up と AWS への移行gree_tech
 
Apache Traffic Server
Apache Traffic ServerApache Traffic Server
Apache Traffic Serversupertom
 
ゴシッププロトコルによる冗長化と負荷分散の検証
ゴシッププロトコルによる冗長化と負荷分散の検証ゴシッププロトコルによる冗長化と負荷分散の検証
ゴシッププロトコルによる冗長化と負荷分散の検証Sugawara Genki
 
Mercadolivre Vs OLX - uma breve análise dos seus diferenciais no segmento de ...
Mercadolivre Vs OLX - uma breve análise dos seus diferenciais no segmento de ...Mercadolivre Vs OLX - uma breve análise dos seus diferenciais no segmento de ...
Mercadolivre Vs OLX - uma breve análise dos seus diferenciais no segmento de ...Humberto Waltrick
 
ログ+メトリック+トレースの組み合わせで構築する一元的なオブザーバビリティ
ログ+メトリック+トレースの組み合わせで構築する一元的なオブザーバビリティログ+メトリック+トレースの組み合わせで構築する一元的なオブザーバビリティ
ログ+メトリック+トレースの組み合わせで構築する一元的なオブザーバビリティElasticsearch
 
サーバーレスなPCI DSS対応クレジットカード決済基盤システムを運用しながら、みんなでわいわいDIYの精神で、新しいモバイル決済サービス6gramを作っ...
サーバーレスなPCI DSS対応クレジットカード決済基盤システムを運用しながら、みんなでわいわいDIYの精神で、新しいモバイル決済サービス6gramを作っ...サーバーレスなPCI DSS対応クレジットカード決済基盤システムを運用しながら、みんなでわいわいDIYの精神で、新しいモバイル決済サービス6gramを作っ...
サーバーレスなPCI DSS対応クレジットカード決済基盤システムを運用しながら、みんなでわいわいDIYの精神で、新しいモバイル決済サービス6gramを作っ...Fumitoshi Taoka
 
Build 番号の自動更新スクリプトについて #cocoa_kansai
Build 番号の自動更新スクリプトについて #cocoa_kansaiBuild 番号の自動更新スクリプトについて #cocoa_kansai
Build 番号の自動更新スクリプトについて #cocoa_kansaiTomohiro Kumagai
 
フリーでできるWebセキュリティ(burp編)
フリーでできるWebセキュリティ(burp編)フリーでできるWebセキュリティ(burp編)
フリーでできるWebセキュリティ(burp編)abend_cve_9999_0001
 
Size Matters-Best Practices for Trillion Row Datasets on ClickHouse-2202-08-1...
Size Matters-Best Practices for Trillion Row Datasets on ClickHouse-2202-08-1...Size Matters-Best Practices for Trillion Row Datasets on ClickHouse-2202-08-1...
Size Matters-Best Practices for Trillion Row Datasets on ClickHouse-2202-08-1...Altinity Ltd
 
Exploring ZIO Prelude: The game changer for typeclasses in Scala
Exploring ZIO Prelude: The game changer for typeclasses in ScalaExploring ZIO Prelude: The game changer for typeclasses in Scala
Exploring ZIO Prelude: The game changer for typeclasses in ScalaJorge Vásquez
 

What's hot (20)

Data-Intensive Workflows with DAOS
Data-Intensive Workflows with DAOSData-Intensive Workflows with DAOS
Data-Intensive Workflows with DAOS
 
MySQL Performance Tuning: Top 10 Tips
MySQL Performance Tuning: Top 10 TipsMySQL Performance Tuning: Top 10 Tips
MySQL Performance Tuning: Top 10 Tips
 
Nat, List and Option Monoids - from scratch - Combining and Folding - an example
Nat, List and Option Monoids -from scratch -Combining and Folding -an exampleNat, List and Option Monoids -from scratch -Combining and Folding -an example
Nat, List and Option Monoids - from scratch - Combining and Folding - an example
 
Peeking inside the engine of ZIO SQL.pdf
Peeking inside the engine of ZIO SQL.pdfPeeking inside the engine of ZIO SQL.pdf
Peeking inside the engine of ZIO SQL.pdf
 
Reverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading SkillsReverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading Skills
 
How to Take Advantage of Optimizer Improvements in MySQL 8.0
How to Take Advantage of Optimizer Improvements in MySQL 8.0How to Take Advantage of Optimizer Improvements in MySQL 8.0
How to Take Advantage of Optimizer Improvements in MySQL 8.0
 
UTP(UML Testing Profile)概要紹介
UTP(UML Testing Profile)概要紹介UTP(UML Testing Profile)概要紹介
UTP(UML Testing Profile)概要紹介
 
PHP Version Up と AWS への移行
PHP Version Up と AWS への移行PHP Version Up と AWS への移行
PHP Version Up と AWS への移行
 
Apache Traffic Server
Apache Traffic ServerApache Traffic Server
Apache Traffic Server
 
Redis vs Aerospike
Redis vs AerospikeRedis vs Aerospike
Redis vs Aerospike
 
ゴシッププロトコルによる冗長化と負荷分散の検証
ゴシッププロトコルによる冗長化と負荷分散の検証ゴシッププロトコルによる冗長化と負荷分散の検証
ゴシッププロトコルによる冗長化と負荷分散の検証
 
Joy of scala
Joy of scalaJoy of scala
Joy of scala
 
Mercadolivre Vs OLX - uma breve análise dos seus diferenciais no segmento de ...
Mercadolivre Vs OLX - uma breve análise dos seus diferenciais no segmento de ...Mercadolivre Vs OLX - uma breve análise dos seus diferenciais no segmento de ...
Mercadolivre Vs OLX - uma breve análise dos seus diferenciais no segmento de ...
 
ログ+メトリック+トレースの組み合わせで構築する一元的なオブザーバビリティ
ログ+メトリック+トレースの組み合わせで構築する一元的なオブザーバビリティログ+メトリック+トレースの組み合わせで構築する一元的なオブザーバビリティ
ログ+メトリック+トレースの組み合わせで構築する一元的なオブザーバビリティ
 
サーバーレスなPCI DSS対応クレジットカード決済基盤システムを運用しながら、みんなでわいわいDIYの精神で、新しいモバイル決済サービス6gramを作っ...
サーバーレスなPCI DSS対応クレジットカード決済基盤システムを運用しながら、みんなでわいわいDIYの精神で、新しいモバイル決済サービス6gramを作っ...サーバーレスなPCI DSS対応クレジットカード決済基盤システムを運用しながら、みんなでわいわいDIYの精神で、新しいモバイル決済サービス6gramを作っ...
サーバーレスなPCI DSS対応クレジットカード決済基盤システムを運用しながら、みんなでわいわいDIYの精神で、新しいモバイル決済サービス6gramを作っ...
 
Apache Spark + Arrow
Apache Spark + ArrowApache Spark + Arrow
Apache Spark + Arrow
 
Build 番号の自動更新スクリプトについて #cocoa_kansai
Build 番号の自動更新スクリプトについて #cocoa_kansaiBuild 番号の自動更新スクリプトについて #cocoa_kansai
Build 番号の自動更新スクリプトについて #cocoa_kansai
 
フリーでできるWebセキュリティ(burp編)
フリーでできるWebセキュリティ(burp編)フリーでできるWebセキュリティ(burp編)
フリーでできるWebセキュリティ(burp編)
 
Size Matters-Best Practices for Trillion Row Datasets on ClickHouse-2202-08-1...
Size Matters-Best Practices for Trillion Row Datasets on ClickHouse-2202-08-1...Size Matters-Best Practices for Trillion Row Datasets on ClickHouse-2202-08-1...
Size Matters-Best Practices for Trillion Row Datasets on ClickHouse-2202-08-1...
 
Exploring ZIO Prelude: The game changer for typeclasses in Scala
Exploring ZIO Prelude: The game changer for typeclasses in ScalaExploring ZIO Prelude: The game changer for typeclasses in Scala
Exploring ZIO Prelude: The game changer for typeclasses in Scala
 

Viewers also liked

程式交易經驗分享系列(2) 交易策略開發步驟
程式交易經驗分享系列(2)   交易策略開發步驟程式交易經驗分享系列(2)   交易策略開發步驟
程式交易經驗分享系列(2) 交易策略開發步驟Philip Zheng
 
程式交易經驗分享系列(1) 程式交易簡介及條件
程式交易經驗分享系列(1)   程式交易簡介及條件程式交易經驗分享系列(1)   程式交易簡介及條件
程式交易經驗分享系列(1) 程式交易簡介及條件Philip Zheng
 
Trading bot演算法與軟工在程式交易上的實踐
Trading bot演算法與軟工在程式交易上的實踐Trading bot演算法與軟工在程式交易上的實踐
Trading bot演算法與軟工在程式交易上的實踐Philip Zheng
 
計量化交易策略的開發與運用 法人版
計量化交易策略的開發與運用 法人版計量化交易策略的開發與運用 法人版
計量化交易策略的開發與運用 法人版derekhcw168
 
藍色投機客 計量化交易策略的開發
藍色投機客 計量化交易策略的開發藍色投機客 計量化交易策略的開發
藍色投機客 計量化交易策略的開發guest87f844
 
程式交易經驗分享系列(3) 策略最佳化及wfa法
程式交易經驗分享系列(3)   策略最佳化及wfa法程式交易經驗分享系列(3)   策略最佳化及wfa法
程式交易經驗分享系列(3) 策略最佳化及wfa法Philip Zheng
 
程式交易經驗分享系列(4) 下單機設定及系列回顧
程式交易經驗分享系列(4)   下單機設定及系列回顧程式交易經驗分享系列(4)   下單機設定及系列回顧
程式交易經驗分享系列(4) 下單機設定及系列回顧Philip Zheng
 
Trading As Your Business
Trading As Your BusinessTrading As Your Business
Trading As Your Businessderekhcw168
 
程式交易介紹及 FinTech 創作分享
程式交易介紹及 FinTech 創作分享程式交易介紹及 FinTech 創作分享
程式交易介紹及 FinTech 創作分享Philip Zheng
 
[DSC 2016] 系列活動:吳牧恩、林佳緯 / 用 R 輕鬆做交易策略分析及自動下單
[DSC 2016] 系列活動:吳牧恩、林佳緯 / 用 R 輕鬆做交易策略分析及自動下單[DSC 2016] 系列活動:吳牧恩、林佳緯 / 用 R 輕鬆做交易策略分析及自動下單
[DSC 2016] 系列活動:吳牧恩、林佳緯 / 用 R 輕鬆做交易策略分析及自動下單台灣資料科學年會
 
[DSC 2016] 系列活動:李宏毅 / 一天搞懂深度學習
[DSC 2016] 系列活動:李宏毅 / 一天搞懂深度學習[DSC 2016] 系列活動:李宏毅 / 一天搞懂深度學習
[DSC 2016] 系列活動:李宏毅 / 一天搞懂深度學習台灣資料科學年會
 
Open Source, Open Data, Open Government
Open Source, Open Data, Open GovernmentOpen Source, Open Data, Open Government
Open Source, Open Data, Open Governmentclkao
 
Trading with opensource tools, two years later
Trading with opensource tools, two years laterTrading with opensource tools, two years later
Trading with opensource tools, two years laterclkao
 
0th Sunflower Digital Camp
0th Sunflower Digital Camp0th Sunflower Digital Camp
0th Sunflower Digital CampAudrey Tang
 
Java8 time
Java8 timeJava8 time
Java8 timekoji lin
 
R統計軟體 -安裝與使用
R統計軟體 -安裝與使用R統計軟體 -安裝與使用
R統計軟體 -安裝與使用Person Lin
 
初學R語言的60分鐘
初學R語言的60分鐘初學R語言的60分鐘
初學R語言的60分鐘Chen-Pan Liao
 
TradingBot & Open Source 精神
TradingBot & Open Source 精神TradingBot & Open Source 精神
TradingBot & Open Source 精神Philip Zheng
 

Viewers also liked (20)

程式交易經驗分享系列(2) 交易策略開發步驟
程式交易經驗分享系列(2)   交易策略開發步驟程式交易經驗分享系列(2)   交易策略開發步驟
程式交易經驗分享系列(2) 交易策略開發步驟
 
程式交易經驗分享系列(1) 程式交易簡介及條件
程式交易經驗分享系列(1)   程式交易簡介及條件程式交易經驗分享系列(1)   程式交易簡介及條件
程式交易經驗分享系列(1) 程式交易簡介及條件
 
Trading bot演算法與軟工在程式交易上的實踐
Trading bot演算法與軟工在程式交易上的實踐Trading bot演算法與軟工在程式交易上的實踐
Trading bot演算法與軟工在程式交易上的實踐
 
計量化交易策略的開發與運用 法人版
計量化交易策略的開發與運用 法人版計量化交易策略的開發與運用 法人版
計量化交易策略的開發與運用 法人版
 
藍色投機客 計量化交易策略的開發
藍色投機客 計量化交易策略的開發藍色投機客 計量化交易策略的開發
藍色投機客 計量化交易策略的開發
 
程式交易經驗分享系列(3) 策略最佳化及wfa法
程式交易經驗分享系列(3)   策略最佳化及wfa法程式交易經驗分享系列(3)   策略最佳化及wfa法
程式交易經驗分享系列(3) 策略最佳化及wfa法
 
程式交易經驗分享系列(4) 下單機設定及系列回顧
程式交易經驗分享系列(4)   下單機設定及系列回顧程式交易經驗分享系列(4)   下單機設定及系列回顧
程式交易經驗分享系列(4) 下單機設定及系列回顧
 
Trading As Your Business
Trading As Your BusinessTrading As Your Business
Trading As Your Business
 
程式交易介紹及 FinTech 創作分享
程式交易介紹及 FinTech 創作分享程式交易介紹及 FinTech 創作分享
程式交易介紹及 FinTech 創作分享
 
[DSC 2016] 系列活動:吳牧恩、林佳緯 / 用 R 輕鬆做交易策略分析及自動下單
[DSC 2016] 系列活動:吳牧恩、林佳緯 / 用 R 輕鬆做交易策略分析及自動下單[DSC 2016] 系列活動:吳牧恩、林佳緯 / 用 R 輕鬆做交易策略分析及自動下單
[DSC 2016] 系列活動:吳牧恩、林佳緯 / 用 R 輕鬆做交易策略分析及自動下單
 
[DSC 2016] 系列活動:李宏毅 / 一天搞懂深度學習
[DSC 2016] 系列活動:李宏毅 / 一天搞懂深度學習[DSC 2016] 系列活動:李宏毅 / 一天搞懂深度學習
[DSC 2016] 系列活動:李宏毅 / 一天搞懂深度學習
 
Open Source, Open Data, Open Government
Open Source, Open Data, Open GovernmentOpen Source, Open Data, Open Government
Open Source, Open Data, Open Government
 
Trading with opensource tools, two years later
Trading with opensource tools, two years laterTrading with opensource tools, two years later
Trading with opensource tools, two years later
 
0th Sunflower Digital Camp
0th Sunflower Digital Camp0th Sunflower Digital Camp
0th Sunflower Digital Camp
 
Java8 time
Java8 timeJava8 time
Java8 time
 
開盤八法
開盤八法開盤八法
開盤八法
 
R統計軟體 -安裝與使用
R統計軟體 -安裝與使用R統計軟體 -安裝與使用
R統計軟體 -安裝與使用
 
Machine Learning in R
Machine Learning in RMachine Learning in R
Machine Learning in R
 
初學R語言的60分鐘
初學R語言的60分鐘初學R語言的60分鐘
初學R語言的60分鐘
 
TradingBot & Open Source 精神
TradingBot & Open Source 精神TradingBot & Open Source 精神
TradingBot & Open Source 精神
 

Similar to Trading With Open Source Tools

Finance for hackers
Finance for hackersFinance for hackers
Finance for hackersNick Owen
 
تعليم الفوركس مع اف اكس اربيا
تعليم الفوركس مع اف اكس اربياتعليم الفوركس مع اف اكس اربيا
تعليم الفوركس مع اف اكس اربياMohamed Mahmoud
 
AP MIcro Perfect Competition
AP MIcro Perfect CompetitionAP MIcro Perfect Competition
AP MIcro Perfect CompetitionMrRed
 
Case 11 Pacific Drilling the Preferred Offshore Driller C-14
Case 11 Pacific Drilling the Preferred Offshore Driller C-14Case 11 Pacific Drilling the Preferred Offshore Driller C-14
Case 11 Pacific Drilling the Preferred Offshore Driller C-14TawnaDelatorrejs
 
Business Game Presentation of Management Audit
Business Game Presentation of Management AuditBusiness Game Presentation of Management Audit
Business Game Presentation of Management AuditEren Kongu
 
Shorting Index Futures Options
Shorting Index Futures OptionsShorting Index Futures Options
Shorting Index Futures OptionsEricHartford
 
[Econ] PPT by Kittycolz -- Pure Competition McConnel 16th-19th Edition
[Econ] PPT by Kittycolz  -- Pure Competition McConnel 16th-19th Edition[Econ] PPT by Kittycolz  -- Pure Competition McConnel 16th-19th Edition
[Econ] PPT by Kittycolz -- Pure Competition McConnel 16th-19th EditionNicole Lim
 
Amibroker AFL Coding - Webinar
Amibroker AFL Coding - WebinarAmibroker AFL Coding - Webinar
Amibroker AFL Coding - WebinarMarketcalls
 
Capital structure and cost of equity pdf
Capital structure and cost of equity pdfCapital structure and cost of equity pdf
Capital structure and cost of equity pdfDavid Keck
 
Linux kernel debugging(PDF format)
Linux kernel debugging(PDF format)Linux kernel debugging(PDF format)
Linux kernel debugging(PDF format)yang firo
 
Linux kernel debugging(ODP format)
Linux kernel debugging(ODP format)Linux kernel debugging(ODP format)
Linux kernel debugging(ODP format)yang firo
 
AP Micro Pure Monopoly
AP Micro  Pure MonopolyAP Micro  Pure Monopoly
AP Micro Pure MonopolyMrRed
 
HBASE Performane Test
HBASE Performane TestHBASE Performane Test
HBASE Performane TestLouis liu
 
Econ606 chapter 10 2020
Econ606 chapter 10 2020Econ606 chapter 10 2020
Econ606 chapter 10 2020sakanor
 
viability-presentation-se-98b.pptx
viability-presentation-se-98b.pptxviability-presentation-se-98b.pptx
viability-presentation-se-98b.pptxSAYKEATTAN
 

Similar to Trading With Open Source Tools (20)

Finance for hackers
Finance for hackersFinance for hackers
Finance for hackers
 
تعليم الفوركس مع اف اكس اربيا
تعليم الفوركس مع اف اكس اربياتعليم الفوركس مع اف اكس اربيا
تعليم الفوركس مع اف اكس اربيا
 
AP MIcro Perfect Competition
AP MIcro Perfect CompetitionAP MIcro Perfect Competition
AP MIcro Perfect Competition
 
Chap5
Chap5Chap5
Chap5
 
Chap5
Chap5Chap5
Chap5
 
Case 11 Pacific Drilling the Preferred Offshore Driller C-14
Case 11 Pacific Drilling the Preferred Offshore Driller C-14Case 11 Pacific Drilling the Preferred Offshore Driller C-14
Case 11 Pacific Drilling the Preferred Offshore Driller C-14
 
Business Game Presentation of Management Audit
Business Game Presentation of Management AuditBusiness Game Presentation of Management Audit
Business Game Presentation of Management Audit
 
Shorting Index Futures Options
Shorting Index Futures OptionsShorting Index Futures Options
Shorting Index Futures Options
 
SCORECARD2
SCORECARD2SCORECARD2
SCORECARD2
 
[Econ] PPT by Kittycolz -- Pure Competition McConnel 16th-19th Edition
[Econ] PPT by Kittycolz  -- Pure Competition McConnel 16th-19th Edition[Econ] PPT by Kittycolz  -- Pure Competition McConnel 16th-19th Edition
[Econ] PPT by Kittycolz -- Pure Competition McConnel 16th-19th Edition
 
Amibroker AFL Coding - Webinar
Amibroker AFL Coding - WebinarAmibroker AFL Coding - Webinar
Amibroker AFL Coding - Webinar
 
Capital structure and cost of equity pdf
Capital structure and cost of equity pdfCapital structure and cost of equity pdf
Capital structure and cost of equity pdf
 
Linux kernel debugging(PDF format)
Linux kernel debugging(PDF format)Linux kernel debugging(PDF format)
Linux kernel debugging(PDF format)
 
Linux kernel debugging(ODP format)
Linux kernel debugging(ODP format)Linux kernel debugging(ODP format)
Linux kernel debugging(ODP format)
 
AP Micro Pure Monopoly
AP Micro  Pure MonopolyAP Micro  Pure Monopoly
AP Micro Pure Monopoly
 
2. intro. to six sigma
2. intro. to six sigma2. intro. to six sigma
2. intro. to six sigma
 
HBASE Performane Test
HBASE Performane TestHBASE Performane Test
HBASE Performane Test
 
sk discovery-006120-Algorithm Investment Report
sk discovery-006120-Algorithm Investment Reportsk discovery-006120-Algorithm Investment Report
sk discovery-006120-Algorithm Investment Report
 
Econ606 chapter 10 2020
Econ606 chapter 10 2020Econ606 chapter 10 2020
Econ606 chapter 10 2020
 
viability-presentation-se-98b.pptx
viability-presentation-se-98b.pptxviability-presentation-se-98b.pptx
viability-presentation-se-98b.pptx
 

More from clkao

AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webclkao
 
Websockets at tossug
Websockets at tossugWebsockets at tossug
Websockets at tossugclkao
 
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webclkao
 
"Lego Programming" with Lorzy
"Lego Programming" with Lorzy"Lego Programming" with Lorzy
"Lego Programming" with Lorzyclkao
 
Devel::NYTProf
Devel::NYTProfDevel::NYTProf
Devel::NYTProfclkao
 
Twopenhack08 Fnord
Twopenhack08 FnordTwopenhack08 Fnord
Twopenhack08 Fnordclkao
 
Svk Br Yapceu2008
Svk Br Yapceu2008Svk Br Yapceu2008
Svk Br Yapceu2008clkao
 
prototype::signatures
prototype::signaturesprototype::signatures
prototype::signaturesclkao
 
Leon & Andrea
Leon & AndreaLeon & Andrea
Leon & Andreaclkao
 

More from clkao (9)

AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time web
 
Websockets at tossug
Websockets at tossugWebsockets at tossug
Websockets at tossug
 
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time web
 
"Lego Programming" with Lorzy
"Lego Programming" with Lorzy"Lego Programming" with Lorzy
"Lego Programming" with Lorzy
 
Devel::NYTProf
Devel::NYTProfDevel::NYTProf
Devel::NYTProf
 
Twopenhack08 Fnord
Twopenhack08 FnordTwopenhack08 Fnord
Twopenhack08 Fnord
 
Svk Br Yapceu2008
Svk Br Yapceu2008Svk Br Yapceu2008
Svk Br Yapceu2008
 
prototype::signatures
prototype::signaturesprototype::signatures
prototype::signatures
 
Leon & Andrea
Leon & AndreaLeon & Andrea
Leon & Andrea
 

Recently uploaded

The Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdfThe Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdfGale Pooley
 
Instant Issue Debit Cards - School Designs
Instant Issue Debit Cards - School DesignsInstant Issue Debit Cards - School Designs
Instant Issue Debit Cards - School Designsegoetzinger
 
The Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfThe Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfGale Pooley
 
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Dividend Policy and Dividend Decision Theories.pptx
Dividend Policy and Dividend Decision Theories.pptxDividend Policy and Dividend Decision Theories.pptx
Dividend Policy and Dividend Decision Theories.pptxanshikagoel52
 
Log your LOA pain with Pension Lab's brilliant campaign
Log your LOA pain with Pension Lab's brilliant campaignLog your LOA pain with Pension Lab's brilliant campaign
Log your LOA pain with Pension Lab's brilliant campaignHenry Tapper
 
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure serviceCall US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure servicePooja Nehwal
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best sexual serviceanilsa9823
 
High Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
High Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsHigh Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
High Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...Call Girls in Nagpur High Profile
 
WhatsApp 📞 Call : 9892124323 ✅Call Girls In Chembur ( Mumbai ) secure service
WhatsApp 📞 Call : 9892124323  ✅Call Girls In Chembur ( Mumbai ) secure serviceWhatsApp 📞 Call : 9892124323  ✅Call Girls In Chembur ( Mumbai ) secure service
WhatsApp 📞 Call : 9892124323 ✅Call Girls In Chembur ( Mumbai ) secure servicePooja Nehwal
 
The Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdfThe Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdfGale Pooley
 
The Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdfThe Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdfGale Pooley
 
03_Emmanuel Ndiaye_Degroof Petercam.pptx
03_Emmanuel Ndiaye_Degroof Petercam.pptx03_Emmanuel Ndiaye_Degroof Petercam.pptx
03_Emmanuel Ndiaye_Degroof Petercam.pptxFinTech Belgium
 
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...ssifa0344
 
Top Rated Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...
Top Rated  Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...Top Rated  Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...
Top Rated Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...Call Girls in Nagpur High Profile
 
Stock Market Brief Deck (Under Pressure).pdf
Stock Market Brief Deck (Under Pressure).pdfStock Market Brief Deck (Under Pressure).pdf
Stock Market Brief Deck (Under Pressure).pdfMichael Silva
 
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptxFinTech Belgium
 

Recently uploaded (20)

The Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdfThe Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdf
 
Instant Issue Debit Cards - School Designs
Instant Issue Debit Cards - School DesignsInstant Issue Debit Cards - School Designs
Instant Issue Debit Cards - School Designs
 
The Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfThe Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdf
 
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
 
Dividend Policy and Dividend Decision Theories.pptx
Dividend Policy and Dividend Decision Theories.pptxDividend Policy and Dividend Decision Theories.pptx
Dividend Policy and Dividend Decision Theories.pptx
 
Log your LOA pain with Pension Lab's brilliant campaign
Log your LOA pain with Pension Lab's brilliant campaignLog your LOA pain with Pension Lab's brilliant campaign
Log your LOA pain with Pension Lab's brilliant campaign
 
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
 
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure serviceCall US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best sexual service
 
High Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
High Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsHigh Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
High Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
 
WhatsApp 📞 Call : 9892124323 ✅Call Girls In Chembur ( Mumbai ) secure service
WhatsApp 📞 Call : 9892124323  ✅Call Girls In Chembur ( Mumbai ) secure serviceWhatsApp 📞 Call : 9892124323  ✅Call Girls In Chembur ( Mumbai ) secure service
WhatsApp 📞 Call : 9892124323 ✅Call Girls In Chembur ( Mumbai ) secure service
 
The Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdfThe Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdf
 
The Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdfThe Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdf
 
03_Emmanuel Ndiaye_Degroof Petercam.pptx
03_Emmanuel Ndiaye_Degroof Petercam.pptx03_Emmanuel Ndiaye_Degroof Petercam.pptx
03_Emmanuel Ndiaye_Degroof Petercam.pptx
 
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
 
Top Rated Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...
Top Rated  Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...Top Rated  Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...
Top Rated Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...
 
Stock Market Brief Deck (Under Pressure).pdf
Stock Market Brief Deck (Under Pressure).pdfStock Market Brief Deck (Under Pressure).pdf
Stock Market Brief Deck (Under Pressure).pdf
 
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
 

Trading With Open Source Tools

  • 1. Trading with open source tools Chia-liang Kao clkao@clkao.org OSDC.TW 2009 Taipei
  • 2.
  • 3.
  • 4.
  • 5.
  • 7. Caution There is ABSOLUTELY NO WARRANTY if you use any of the code or strategy mentioned in this talk.
  • 11. Take #1 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade
  • 12. Take #1 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade Long Signal
  • 13. Take #1 (Random returns 0..5) SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade Long Signal
  • 14. Take #1 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade Long Signal
  • 15. Take #1 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade Short Signal
  • 16. Take #1 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade Enters at 08:50
  • 17. Take #1 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade
  • 18. Take #1 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade % perl backtest.pl --start=2001-01-01 --end=2007-12-31 --timeframe 5min --money-management='FixedShares 1' OSDC1 TX
  • 19. Take #1 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade Taiwan Weighted Futures 1 point = nt$200 % perl backtest.pl --start=2001-01-01 --end=2007-12-31 --timeframe 5min --money-management='FixedShares 1' OSDC1 TX
  • 20. Take #1 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade
  • 21. Take #1 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade ----------------------------------------------------- Performance : -199.1 ( nan%) Buy & Hold : 77.5% ( 14.2%) () => by year MaxDrawDown : 201.6% B&H MaxDrawDown : 44.8% Best performance : 3.3% Worst performance : -204.9 Net gain : -19910.00 Gross gain : -2590.00 Trades statistics : Number of trades : 1732 Trades/Year : 247.97 Number of gains : 698 Number of losses : 1034 Win. ratio : 40.3% Max consec. win : 7 Max consec. loss : 13 Expectancy : -0.00 Average gain : 0.87% Average loss : -0.94% Avg. perf : nan% Biggest gain : 6.44% Biggest loss : -6.65% Profit fac : 0.92 Sum of gains : 36090.00 Sum of losses : -56000.00 Risk of ruin : 100.0
  • 22. Take #1 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade ----------------------------------------------------- Performance : -199.1 ( nan%) Buy & Hold : 77.5% ( 14.2%) () => by year MaxDrawDown : 201.6% B&H MaxDrawDown : 44.8% Best performance : 3.3% Worst performance : -204.9 Net gain : -19910.00 Gross gain : -2590.00 Trades statistics : Number of trades : 1732 Trades/Year : 247.97 Number of gains : 698 Number of losses : 1034 Win. ratio : 40.3% Max consec. win : 7 Max consec. loss : 13 Expectancy : -0.00 Average gain : 0.87% Average loss : -0.94% Avg. perf : nan% Biggest gain : 6.44% Biggest loss : -6.65% Profit fac : 0.92 Sum of gains : 36090.00 Sum of losses : -56000.00 Risk of ruin : 100.0
  • 23. Take #1 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade ----------------------------------------------------- Performance : -199.1 ( nan%) Buy & Hold : 77.5% ( 14.2%) () => by year MaxDrawDown : 201.6% B&H MaxDrawDown : 44.8% Best performance : 3.3% Worst performance : -204.9 -NT$3,982,000 Net gain : -19910.00 Gross gain : -2590.00 Trades statistics : Number of trades : 1732 Trades/Year : 247.97 Number of gains : 698 Number of losses : 1034 Win. ratio : 40.3% Max consec. win : 7 Max consec. loss : 13 Expectancy : -0.00 Average gain : 0.87% Average loss : -0.94% Avg. perf : nan% Biggest gain : 6.44% Biggest loss : -6.65% Profit fac : 0.92 Sum of gains : 36090.00 Sum of losses : -56000.00 Risk of ruin : 100.0
  • 24. Take #1 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade ----------------------------------------------------- Performance : -199.1 ( nan%) Buy & Hold : 77.5% ( 14.2%) () => by year MaxDrawDown : 201.6% B&H MaxDrawDown : 44.8% Best performance : 3.3% Worst performance : -204.9 -NT$3,982,000 Net gain : -19910.00 Gross gain : -2590.00 Trades statistics : Number of trades : 1732 Trades/Year : 247.97 Number of gains : 698 Number of losses : 1034 Win. ratio : 40.3% Max consec. win : 7 Max consec. loss : 13 Expectancy : -0.00 Average gain : 0.87% Average loss : -0.94% Avg. perf : nan% Biggest gain : 6.44% Biggest loss : -6.65% Profit fac : 0.92 Sum of gains : 36090.00 Sum of losses : -56000.00 Risk of ruin : 100.0 DOOMED!!
  • 25. Take #2 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade |CS:Stop:Fixed 1.5
  • 26. Take #2 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade Stop when losing 1.5% |CS:Stop:Fixed 1.5
  • 27. Take #2 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade |CS:Stop:Fixed 1.5
  • 28. Take #2 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade |CS:Stop:Fixed 1.5 ----------------------------------------------------- Performance : -124.4 ( nan%) Buy & Hold : 77.5% ( 14.2%) () => by year MaxDrawDown : 136.8% B&H MaxDrawDown : 44.8% Best performance : 2.0% Worst performance : -137.5 Net gain : -12442.13 Gross gain : 4877.87 Trades statistics : Number of trades : 1732 Trades/Year : 247.97 Number of gains : 715 Number of losses : 1017 Win. ratio : 41.3% Max consec. win : 11 Max consec. loss : 16 Expectancy : -0.00 Average gain : 0.88% Average loss : -0.83% Avg. perf : nan% Biggest gain : 5.67% Biggest loss : -1.79% Profit fac : 1.05 Sum of gains : 37037.00 Sum of losses : -49479.13 Risk of ruin : 100.0
  • 29. Take #2 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade |CS:Stop:Fixed 1.5 ----------------------------------------------------- Performance : -124.4 ( nan%) Buy & Hold : 77.5% ( 14.2%) () => by year MaxDrawDown : 136.8% B&H MaxDrawDown : 44.8% Best performance : 2.0% Worst performance : -137.5 -NT$2,488,426 Net gain : -12442.13 Gross gain : 4877.87 Trades statistics : Number of trades : 1732 Trades/Year : 247.97 Number of gains : 715 Number of losses : 1017 Win. ratio : 41.3% Max consec. win : 11 Max consec. loss : 16 Expectancy : -0.00 Average gain : 0.88% Average loss : -0.83% Avg. perf : nan% Biggest gain : 5.67% Biggest loss : -1.79% Profit fac : 1.05 Sum of gains : 37037.00 Sum of losses : -49479.13 Risk of ruin : 100.0
  • 30. Take #2 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade |CS:Stop:Fixed 1.5 ----------------------------------------------------- Performance : -124.4 ( nan%) Buy & Hold : 77.5% ( 14.2%) () => by year MaxDrawDown : 136.8% B&H MaxDrawDown : 44.8% Best performance : 2.0% Worst performance : -137.5 -NT$2,488,426 Net gain : -12442.13 Gross gain : 4877.87 Trades statistics : Number of trades : 1732 Trades/Year : 247.97 Number of gains : 715 Number of losses : 1017 Win. ratio : 41.3% Max consec. win : 11 Max consec. loss : 16 Expectancy : -0.00 Average gain : 0.88% Average loss : -0.83% Avg. perf : nan% Biggest gain : 5.67% Biggest loss : -1.79% Profit fac : 1.05 Sum of gains : 37037.00 Sum of losses : -49479.13 Risk of ruin : 100.0 Much better, but still negative
  • 31. Take #3 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade |CS:Stop:Fixed 2.5
  • 32. Take #3 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade Stop when losing 2.5% |CS:Stop:Fixed 2.5
  • 33. Take #3 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade |CS:Stop:Fixed 2.5
  • 34. Take #3 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade |CS:Stop:Fixed 2.5 ----------------------------------------------------- Performance : -149.8 ( nan%) Buy & Hold : 77.5% ( 14.2%) () => by year MaxDrawDown : 155.0% B&H MaxDrawDown : 44.8% Best performance : 0.0% Worst performance : -155.0 Net gain : -14977.47 Gross gain : 2342.53 Trades statistics : Number of trades : 1732 Trades/Year : 247.97 Number of gains : 706 Number of losses : 1026 Win. ratio : 40.8% Max consec. win : 8 Max consec. loss : 14 Expectancy : -0.00 Average gain : 0.91% Average loss : -0.87% Avg. perf : nan% Biggest gain : 6.29% Biggest loss : -2.78% Profit fac : 1.05 Sum of gains : 37749.00 Sum of losses : -52726.47 Risk of ruin : 100.0
  • 35. Take #3 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade |CS:Stop:Fixed 2.5 ----------------------------------------------------- Performance : -149.8 ( nan%) Buy & Hold : 77.5% ( 14.2%) () => by year MaxDrawDown : 155.0% B&H MaxDrawDown : 44.8% Best performance : 0.0% Worst performance : -155.0 -NT$2,995,494 Net gain : -14977.47 Gross gain : 2342.53 Trades statistics : Number of trades : 1732 Trades/Year : 247.97 Number of gains : 706 Number of losses : 1026 Win. ratio : 40.8% Max consec. win : 8 Max consec. loss : 14 Expectancy : -0.00 Average gain : 0.91% Average loss : -0.87% Avg. perf : nan% Biggest gain : 6.29% Biggest loss : -2.78% Profit fac : 1.05 Sum of gains : 37749.00 Sum of losses : -52726.47 Risk of ruin : 100.0
  • 36. Take #3 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:DayTrade |CS:Stop:Fixed 2.5 ----------------------------------------------------- Performance : -149.8 ( nan%) Buy & Hold : 77.5% ( 14.2%) () => by year MaxDrawDown : 155.0% B&H MaxDrawDown : 44.8% Best performance : 0.0% Worst performance : -155.0 -NT$2,995,494 Net gain : -14977.47 Gross gain : 2342.53 Trades statistics : Number of trades : 1732 Trades/Year : 247.97 Number of gains : 706 Number of losses : 1026 Win. ratio : 40.8% Max consec. win : 8 Max consec. loss : 14 Expectancy : -0.00 Average gain : 0.91% Average loss : -0.87% Avg. perf : nan% Biggest gain : 6.29% Biggest loss : -2.78% Profit fac : 1.05 Sum of gains : 37749.00 Sum of losses : -52726.47 Risk of ruin : 100.0 Not better after increase the stop threshold
  • 37. Take #4 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:Stop:Fixed 5 |CS:CloseGain 10
  • 38. Take #4 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:Stop:Fixed 5 Stop when winning 10% |CS:CloseGain 10
  • 39. Take #4 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:Stop:Fixed 5 |CS:CloseGain 10
  • 40. Take #4 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:Stop:Fixed 5 |CS:CloseGain 10 ----------------------------------------------------- Performance : 29.2% ( 6.1%) Buy & Hold : 77.5% ( 14.2%) () => by year MaxDrawDown : 24.9% B&H MaxDrawDown : 44.8% Best performance : 49.7% Worst performance : -1.2% Net gain : 2920.65 Gross gain : 3730.65 Trades statistics : Number of trades : 81 Trades/Year : 11.60 Number of gains : 32 Number of losses : 49 Win. ratio : 39.5% Max consec. win : 4 Max consec. loss : 8 Expectancy : 0.01 Average gain : 9.92% Average loss : -5.43% Avg. perf : 0.32% Biggest gain : 11.50% Biggest loss : -9.73% Profit fac : 1.83 Sum of gains : 18313.10 Sum of losses : -15392.45 Risk of ruin : 21.3%
  • 41. Take #4 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:Stop:Fixed 5 |CS:CloseGain 10 ----------------------------------------------------- Performance : 29.2% ( 6.1%) Buy & Hold : 77.5% ( 14.2%) () => by year MaxDrawDown : 24.9% B&H MaxDrawDown : 44.8% Best performance : 49.7% Worst performance : -1.2% NT$584,130 Net gain : 2920.65 Gross gain : 3730.65 Trades statistics : Number of trades : 81 Trades/Year : 11.60 Number of gains : 32 Number of losses : 49 Win. ratio : 39.5% Max consec. win : 4 Max consec. loss : 8 Expectancy : 0.01 Average gain : 9.92% Average loss : -5.43% Avg. perf : 0.32% Biggest gain : 11.50% Biggest loss : -9.73% Profit fac : 1.83 Sum of gains : 18313.10 Sum of losses : -15392.45 Risk of ruin : 21.3%
  • 42. Take #4 SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:Stop:Fixed 5 |CS:CloseGain 10 ----------------------------------------------------- Performance : 29.2% ( 6.1%) Buy & Hold : 77.5% ( 14.2%) () => by year MaxDrawDown : 24.9% B&H MaxDrawDown : 44.8% Best performance : 49.7% Worst performance : -1.2% NT$584,130 Net gain : 2920.65 Gross gain : 3730.65 Trades statistics : Number of trades : 81 Trades/Year : 11.60 PROFIT!! Number of gains : 32 Number of losses : 49 Win. ratio : 39.5% Max consec. win : 4 Max consec. loss : 8 Expectancy : 0.01 Average gain : 9.92% Average loss : -5.43% Avg. perf : 0.32% Biggest gain : 11.50% Biggest loss : -9.73% Profit fac : 1.83 Sum of gains : 18313.10 Sum of losses : -15392.45 Risk of ruin : 21.3%
  • 43. Take #5 SY:Generic {I:G:Eval ( {I:LastTrade} ? {I:LastTrade}==1 : {S:G:Above {I:Random 6} 2})} {I:G:Eval ( {I:LastTrade} ? {I:LastTrade}==-1 : {S:G:Below {I:Random 6} 3})} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:Stop:Fixed 5 |CS:CloseGain 10
  • 44. Take #5 SY:Generic {I:G:Eval ( {I:LastTrade} ? {I:LastTrade}==1 : {S:G:Above {I:Random 6} 2})} {I:G:Eval ( {I:LastTrade} ? {I:LastTrade}==-1 : {S:G:Below {I:Random 6} 3})} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 Following results from last trade |CS:Stop:Fixed 5 |CS:CloseGain 10
  • 45. Take #5 SY:Generic {I:G:Eval ( {I:LastTrade} ? {I:LastTrade}==1 : {S:G:Above {I:Random 6} 2})} {I:G:Eval ( {I:LastTrade} ? {I:LastTrade}==-1 : {S:G:Below {I:Random 6} 3})} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:Stop:Fixed 5 |CS:CloseGain 10
  • 46. Take #5 SY:Generic {I:G:Eval ( {I:LastTrade} ? {I:LastTrade}==1 : {S:G:Above {I:Random 6} 2})} {I:G:Eval ( {I:LastTrade} ? {I:LastTrade}==-1 : {S:G:Below {I:Random 6} 3})} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:Stop:Fixed 5 |CS:CloseGain 10 ----------------------------------------------------- Performance : 48.4% ( 9.5%) Buy & Hold : 77.5% ( 14.2%) () => by year MaxDrawDown : 19.8% B&H MaxDrawDown : 44.8% Best performance : 49.5% Worst performance : 0.0% Net gain : 4839.75 Gross gain : 5699.75 Trades statistics : Number of trades : 86 Trades/Year : 12.31 Number of gains : 36 Number of losses : 50 Win. ratio : 41.9% Max consec. win : 4 Max consec. loss : 8 Expectancy : 0.01 Average gain : 9.72% Average loss : -5.48% Avg. perf : 0.46% Biggest gain : 10.71% Biggest loss : -11.33% Profit fac : 1.77 Sum of gains : 20674.70 Sum of losses : -15834.95 Risk of ruin : 9.9%
  • 47. Take #5 SY:Generic {I:G:Eval ( {I:LastTrade} ? {I:LastTrade}==1 : {S:G:Above {I:Random 6} 2})} {I:G:Eval ( {I:LastTrade} ? {I:LastTrade}==-1 : {S:G:Below {I:Random 6} 3})} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:Stop:Fixed 5 |CS:CloseGain 10 ----------------------------------------------------- Performance : 48.4% ( 9.5%) Buy & Hold : 77.5% ( 14.2%) () => by year MaxDrawDown : 19.8% B&H MaxDrawDown : 44.8% Best performance : 49.5% Worst performance : 0.0% NT$967,950 Net gain : 4839.75 Gross gain : 5699.75 Trades statistics : Number of trades : 86 Trades/Year : 12.31 Number of gains : 36 Number of losses : 50 Win. ratio : 41.9% Max consec. win : 4 Max consec. loss : 8 Expectancy : 0.01 Average gain : 9.72% Average loss : -5.48% Avg. perf : 0.46% Biggest gain : 10.71% Biggest loss : -11.33% Profit fac : 1.77 Sum of gains : 20674.70 Sum of losses : -15834.95 Risk of ruin : 9.9%
  • 48. The OSDC Trading System Got your dice?
  • 49. SY:Generic {I:G:Eval ( {I:LastTrade} ? {I:LastTrade}==1 : {S:G:Above {I:Random 6} 2})} {I:G:Eval ( {I:LastTrade} ? {I:LastTrade}==-1 : {S:G:Below {I:Random 6} 3})} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:Stop:Fixed 5 |CS:CloseGain 10 ----------------------------------------------------- Performance : 48.4% ( 9.5%) Buy & Hold : 77.5% ( 14.2%) () => by year MaxDrawDown : 19.8% B&H MaxDrawDown : 44.8% Best performance : 49.5% Worst performance : 0.0% Net gain : 4839.75 Gross gain : 5699.75 Trades statistics : Number of trades : 86 Trades/Year : 12.31 Number of gains : 36 Number of losses : 50 Win. ratio : 41.9% Max consec. win : 4 Max consec. loss : 8 Expectancy : 0.01 Average gain : 9.72% Average loss : -5.48% Avg. perf : 0.46% Biggest gain : 10.71% Biggest loss : -11.33% Profit fac : 1.77 Sum of gains : 20674.70 Sum of losses : -15834.95 Risk of ruin : 9.9%
  • 50. SY:Generic {I:G:Eval ( {I:LastTrade} ? {I:LastTrade}==1 : {S:G:Above {I:Random 6} 2})} {I:G:Eval ( {I:LastTrade} ? {I:LastTrade}==-1 : {S:G:Below {I:Random 6} 3})} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:Stop:Fixed 5 |CS:CloseGain 10 ----------------------------------------------------- Performance : 48.4% ( 9.5%) Buy & Hold : 77.5% ( 14.2%) () => by year MaxDrawDown : 19.8% B&H MaxDrawDown : 44.8% Best performance : 49.5% Worst performance : 0.0% Net gain : 4839.75 Gross gain : 5699.75 Trades statistics : Number of trades : 86 Trades/Year : 12.31 Number of gains : 36 Number of losses : 50 Win. ratio : 41.9% Max consec. win : 4 Max consec. loss : 8 Expectancy : 0.01 Average gain : 9.72% Average loss : -5.48% Avg. perf : 0.46% Biggest gain : 10.71% Biggest loss : -11.33% Profit fac : 1.77 Sum of gains : 20674.70 Sum of losses : -15834.95 Risk of ruin : 9.9%
  • 51. SY:Generic {I:G:Eval ( {I:LastTrade} ? {I:LastTrade}==1 : {S:G:Above {I:Random 6} 2})} {I:G:Eval ( {I:LastTrade} ? {I:LastTrade}==-1 : {S:G:Below {I:Random 6} 3})} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:Stop:Fixed 5 |CS:CloseGain 10 ----------------------------------------------------- Performance : 48.4% ( 9.5%) Buy & Hold : 77.5% ( 14.2%) () => by year MaxDrawDown : 19.8% B&H MaxDrawDown : 44.8% Best performance : 49.5% Worst performance : 0.0% Net gain : 4839.75 Gross gain : 5699.75 Trades statistics : Number of trades : 86 Trades/Year : 12.31 Number of gains : 36 Number of losses : 50 Win. ratio : 41.9% Max consec. win : 4 Max consec. loss : 8 Expectancy : 0.01 Average gain : 9.72% Average loss : -5.48% Avg. perf : 0.46% Biggest gain : 10.71% Biggest loss : -11.33% Profit fac : 1.77 Sum of gains : 20674.70 Sum of losses : -15834.95 Risk of ruin : 9.9%
  • 52. Outline • trading system • analysis • backtesting • live trading
  • 53. Trading System Trading system, also known as algorithmic trading, is the use of computer programs for entering trading orders with the computer algorithm deciding on certain aspects of the order such as the timing, price, quantity of order
  • 54. Trading System Trading system, also known as algorithmic trading, is the use of computer programs for entering trading orders with the computer algorithm deciding on certain aspects of the order such as the timing, price, quantity of order Even with dice
  • 55. Analysis • Where are all the loss coming from? • Any interesting correlation with technical indicators? • (Be curious and ask yourself questions about your results)
  • 56. R is a programming language and software environment for statistical computing and graphics. It is an implementation of the S programming language with lexical scoping semantics inspired by Scheme.
  • 57. R is a programming language and software environment for statistical computing and graphics. It is an implementation of the S programming language with lexical scoping semantics inspired by Scheme. to work with numbers, vectors efficiently
  • 58.
  • 59.
  • 60. winamount <- xtabs(paste(quot;profit~quot;, rhs, sep=quot;quot;), data=data[data$profit>0,]) loseamount <- xtabs(paste(quot;profit~quot;, rhs, sep=quot;quot;), data=data[data$profit<=0,]); x$netgain <- winamount+loseamount; x$avgnet <- x$netgain/trade
  • 61. winamount <- xtabs(paste(quot;profit~quot;, rhs, sep=quot;quot;), data=data[data$profit>0,]) loseamount <- xtabs(paste(quot;profit~quot;, rhs, sep=quot;quot;), data=data[data$profit<=0,]); x$netgain <- winamount+loseamount; x$avgnet <- x$netgain/trade
  • 62. winamount <- xtabs(paste(quot;profit~quot;, rhs, sep=quot;quot;), data=data[data$profit>0,]) loseamount <- xtabs(paste(quot;profit~quot;, rhs, sep=quot;quot;), data=data[data$profit<=0,]); x$netgain <- winamount+loseamount; x$avgnet <- x$netgain/trade
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71. Now if we don’t short when we are above the open price....
  • 72. Now if we don’t short when we are above the open price.... Was 5699
  • 73. R also supports nice plotting
  • 75. Backtesting • If you want to write a strategy (which might not be using dice), you want to test it for historical data
  • 76. Backtesting • If you want to write a strategy (which might not be using dice), you want to test it for historical data • “past performance does not guarantee future results”
  • 77. Backtesting • If you want to write a strategy (which might not be using dice), you want to test it for historical data • “past performance does not guarantee future results” • But if your past performance is bad, do you dare to use the system?
  • 79. SY:Generic {S:G:Above {I:Random 6} 2} {S:G:Below {I:Random 6} 3} |TF:Generic {S:G:CrossOverUp {I:Hour} 850} {S:G:CrossOverUp {I:Hour} 850} |TF:MaxOpenTrades 1 |CS:Stop:Fixed 5 |CS:CloseGain 10 • Modular • Flexible • Open source • does backtesting, charting
  • 82. live trading • Data feed • Strategy / System runner
  • 83. live trading • Data feed • Strategy / System runner • Broker API
  • 84. live trading • Data feed • Strategy / System runner • Broker API • Infrastructure • Monitor • Scale and redundancy!
  • 85. Data feed • free: DDE from broker’s software • Win32::DDE (polling) • publish to memcached (or more appropriate message queues) • 10 lines of code • 20 lines for reconnect and robustness
  • 87. Strategy runner • genius trader, available for back test
  • 88. Strategy runner • genius trader, available for back test • GT::Stream, accept streaming data and applies trading system to generate real time signals
  • 89. Strategy runner • genius trader, available for back test • GT::Stream, accept streaming data and applies trading system to generate real time signals • available at: ????
  • 90. Infrastructure • VirtualBox headless & MicroXP • memcached • gearman • nagios
  • 91. Trading platforms • http://geniustrade.org/ • Trade Station (proprietary) • http://ojts.sourceforge.net/ • http://www.marketcetera.org/
  • 93. R tutorials • Econometrics in R (Grant V. Farnsworth) • Practical Regression and Anova using R (Julian J. Faraway)
  • 95.
  • 96.
  • 97. 2009
  • 98. Yesterday... I went to hotsprings in the morning..
  • 99. Yesterday... I went to hotsprings in the morning..