Skip to content

Commit

Permalink
upload recent changes to github
Browse files Browse the repository at this point in the history
  • Loading branch information
nickhuangxinyu1 committed Aug 17, 2019
1 parent 9fe3180 commit c162c4c
Show file tree
Hide file tree
Showing 190 changed files with 13,686 additions and 7,647 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ backend/tools/.*
src/build-*
*.pro.user
core.*
external/common/include/*.cpp
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,20 @@ demostrat:
backtest:
$(WAF) configure backtest $(PARAMS)

convert_to_binary_data:
$(WAF) configure convert_to_binary_data $(PARAMS)

datatools:
$(WAF) configure datatools $(PARAMS)

order_matcher:
$(WAF) configure order_matcher $(PARAMS)

teststrat:
$(WAF) configure teststrat $(PARAMS)

dt:
$(WAF) configure dt $(PARAMS)

clean:
rm -rf build
2 changes: 2 additions & 0 deletions a.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def Print():
print("testing")
343 changes: 96 additions & 247 deletions config/backtest/backtest.config
Original file line number Diff line number Diff line change
@@ -1,114 +1,76 @@
time_controller = {
sleep_time = ["10:14:20-10:30:00", "11:29:20-13:30:00", "03:58:20-08:55:00"];
close_time = ["14:00:59-14:59:00", "23:00:00-23:59:59"];
force_close_time = ["16:59:59-17:30:00"];
time_controller :
{
sleep_time = [ "10:14:20-10:30:00", "11:29:20-13:00:00", "03:58:20-08:55:00" ];
close_time = [ "14:00:59-14:59:00", "23:00:00-23:59:59" ];
force_close_time = [ "16:59:59-17:30:00" ];
};

legend = "nf:rg3:am50:mhc:*";
backtest_out_file = "backtest_record";
strategy = (
{
unique_name = "au";
max_position = 5;
range_width = 2.0;
min_train_samples = 600;
min_range = 2.0;
min_profit = 1.0;
add_margin = 1.0;
spread_threshold = 3.0;
max_holding_sec = 3600000;
stop_loss_margin = 1.0;
max_loss_times = 2;
pairs = ( "au1906", "au1908" );
},

strategy = (
/*
{ unique_name = "AP";
pairs = ("AP910", "AP905");
max_position = 5;
range_width = 1.5;
tick_size = 1.0;
contract_size = 10;
min_train_samples= 600;
cancel_threshhold = 1000000000;
min_range = 4.0;
min_profit = 1.0;
add_margin = 5.0;
spread_threshold = 3.0;
stop_loss_margin = 1.0;
max_loss_times = 2;
max_holding_sec = 144000000;
},
{ unique_name = "CF";
pairs = ("CF909", "CF905");
max_position = 5;
range_width = 1.0;
tick_size = 5.0;
contract_size = 10;
min_train_samples= 600;
cancel_threshhold = 1000000000;
min_range = 4.0;
min_profit = 1.0;
add_margin = 1.0;
spread_threshold = 3.0;
stop_loss_margin = 1.0;
max_loss_times = 2;
max_holding_sec = 3600;
},
{ unique_name = "FG";
pairs = ("FG909", "FG905");
max_position = 5;
range_width = 1.0;
tick_size = 1.0;
contract_size = 10;
min_train_samples= 600;
cancel_threshhold = 1000000000;
min_range = 4.0;
min_profit = 1.0;
add_margin = 1.0;
spread_threshold = 3.0;
max_holding_sec = 3600;
stop_loss_margin = 1.0;
max_loss_times = 2;
},
{ unique_name = "MA";
pairs = ("MA909", "MA905");
max_position = 5;
range_width = 1.0;
tick_size = 1.0;
contract_size = 10;
min_train_samples= 600;
cancel_threshhold = 1000000000;
min_range = 4.0;
min_profit = 1.0;
add_margin = 1.0;
spread_threshold = 3.0;
max_holding_sec = 3600;
stop_loss_margin = 1.0;
max_loss_times = 2;
},
{ unique_name = "OI";
pairs = ("OI909", "OI905");
max_position = 5;
range_width = 1.0;
tick_size = 1.0;
contract_size = 10;
min_train_samples= 600;
cancel_threshhold = 1000000000;
min_range = 4.0;
min_profit = 1.0;
add_margin = 1.0;
spread_threshold = 3.0;
max_holding_sec = 3600;
stop_loss_margin = 1.0;
max_loss_times = 2;
},
{ unique_name = "fu";
pairs = ("fu1909", "fu1905");
max_position = 5;
range_width = 1.0;
tick_size = 1.0;
contract_size = 10;
min_train_samples= 600;
cancel_threshhold = 1000000000;
min_range = 4.0;
min_profit = 1.0;
add_margin = 1.0;
spread_threshold = 3.0;
max_holding_sec = 36000000000;
stop_loss_margin = 1.0;
max_loss_times = 2;
},
{
unique_name = "IH";
max_position = 1;
range_width = 2.0;
min_train_samples = 600;
min_range = 4.0;
min_profit = 1.0;
add_margin = 3.0;
spread_threshold = 3.0;
max_holding_sec = 360000000;
stop_loss_margin = 10.0;
max_loss_times = 2;
pairs = ( "IH1905", "IH1906" );
no_close_today = true;
},
{
unique_name = "IF";
max_position = 1;
range_width = 2.0;
min_train_samples = 600;
min_range = 4.0;
min_profit = 1.0;
add_margin = 3.0;
spread_threshold = 3.0;
max_holding_sec = 360000000;
stop_loss_margin = 10.0;
max_loss_times = 2;
pairs = ( "IF1905", "IF1906" );
no_close_today = true;
},
{
unique_name = "IC";
max_position = 1;
range_width = 2.0;
min_train_samples = 600;
min_range = 4.0;
min_profit = 1.0;
add_margin = 3.0;
spread_threshold = 3.0;
max_holding_sec = 360000000;
stop_loss_margin = 10.0;
max_loss_times = 2;
pairs = ( "IC1905", "IC1906" );
no_close_today = true;
},

{ unique_name = "cu";
pairs = ("cu1905", "cu1904");
max_position = 5;
{
unique_name = "cu";
max_position = 2;
tick_size = 10.0;
range_width = 2.0;
contract_size = 5;
Expand All @@ -121,147 +83,34 @@ strategy = (
max_holding_sec = 3600000;
stop_loss_margin = 1.0;
max_loss_times = 2;
},
*/

{ unique_name = "au";
pairs = ("au1908", "au1906");
max_position = 5;
range_width = 2.0;
min_train_samples= 600;
min_range = 2.0;
min_profit = 1.0;
add_margin = 1.0;
spread_threshold = 3.0;
max_holding_sec = 3600000;
stop_loss_margin = 1.0;
max_loss_times = 2;
},

{ unique_name = "ni";
pairs = ("ni1906", "ni1905");
max_position = 50;
range_width = 2.0;
min_train_samples= 600;
min_range = 4.0;
min_profit = 1.0;
add_margin = 3.0;
spread_threshold = 3.0;
max_holding_sec = 3600000;
stop_loss_margin = 1.0;
max_loss_times = 2;
},

{ unique_name = "IH";
pairs = ("IH1906", "IH1903");
max_position = 2;
range_width = 2.0;
min_train_samples= 600;
min_range = 4.0;
min_profit = 1.0;
add_margin = 3.0;
spread_threshold = 3.0;
max_holding_sec = 360000000;
stop_loss_margin = 1.0;
max_loss_times = 2;
},

{ unique_name = "IF";
pairs = ("IF1906", "IF1903");
max_position = 2;
range_width = 2.0;
min_train_samples= 600;
min_range = 4.0;
min_profit = 1.0;
add_margin = 3.0;
spread_threshold = 3.0;
max_holding_sec = 360000000;
stop_loss_margin = 1.0;
max_loss_times = 2;
},

{ unique_name = "IC";
pairs = ("IC1906", "IC1903");
max_position = 2;
range_width = 2.0;
min_train_samples= 600;
min_range = 4.0;
min_profit = 1.0;
add_margin = 3.0;
spread_threshold = 3.0;
max_holding_sec = 360000000;
stop_loss_margin = 1.0;
max_loss_times = 2;
}

);
pairs = ( "cu1906", "cu1907" );
},

data_file = [
/*
"/running/quant/data/Ali/2018-11-28/AP9",
"/running/quant/data/Ali/2018-12-03/AP9",
"/running/quant/data/Ali/2018-12-05/AP9",
"/running/quant/data/Ali/2018-12-06/AP9",
"/running/quant/data/Ali/2018-12-10/AP9",
"/running/quant/data/Ali/2018-12-11/AP9",
"/running/quant/data/Ali/2018-12-12/AP9",
"/running/quant/data/Ali/2018-12-13/AP9",
"/running/quant/data/Ali/2018-12-14/AP9",
"/running/quant/data/Ali/2018-12-17/AP9",
"/running/quant/data/Ali/2018-12-18/AP9",
"/running/quant/data/Ali/2018-12-19/AP9",
"/running/quant/data/Ali/2018-12-20/AP9",
"/running/quant/data/Ali/2018-12-21/AP9",
"/running/quant/data/Ali/2018-12-24/AP9",
"/running/quant/data/Ali/2018-12-25/AP9",
"/running/quant/data/Ali/2018-12-26/AP9",
"/running/quant/data/Ali/2018-12-27/AP9",
"/running/quant/data/Ali/2018-12-28/AP9",
"/running/quant/data/Ali/2018-12-31/AP9",
"/running/quant/data/Ali/2019-01-01/AP9",
"/running/quant/data/Ali/2019-01-02/AP9",
"/running/quant/data/Ali/2019-01-03/AP9",
"/running/quant/data/Ali/2019-01-04/AP9",
"/running/quant/data/Ali/2019-01-07/AP9",
"/running/quant/data/Ali/2019-01-08/AP9",
"/running/quant/data/Ali/2019-01-09/AP9",
"/running/quant/data/Ali/2019-01-10/AP9",
"/running/quant/data/Ali/2019-01-11/AP9",
"/running/quant/data/Ali/2019-01-14/AP9",
"/running/quant/data/Ali/2019-01-15/AP9",
"/running/quant/data/Ali/2019-01-16/AP9",
"/running/quant/data/Ali/2019-01-17/AP9",
"/running/quant/data/Ali/2019-01-18/AP9",
"/running/quant/data/Ali/2019-01-21/AP9",
"/running/quant/data/Ali/2019-01-22/AP9",
"/running/quant/data/Ali/2019-01-23/AP9",
"/running/quant/data/Ali/2019-01-24/AP9",
"/running/quant/data/Ali/2019-01-25/AP9",
*/
"/running/quant/data/Ali/2019-01-28/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-01-29/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-01-30/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-01-31/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-02-01/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-02-02/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-02-11/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-02-12/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-02-13/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-02-14/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-02-15/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-02-18/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-02-19/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-02-20/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-02-21/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-02-22/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-02-25/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-02-26/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-02-27/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-02-28/IC|IH|IF|ni|au",
"/running/quant/data/Ali/2019-03-01/IC|IH|IF|ni|au"
// "/running/quant/data/Ali/2019-01-15/IC|IH|IF|ni|au"
// "/running/IC|IH|IF|ni|au"
];
{
unique_name = "ni";
max_position = 3;
range_width = 2.0;
min_train_samples = 600;
min_range = 4.0;
min_profit = 1.0;
add_margin = 3.0;
spread_threshold = 3.0;
max_holding_sec = 3600000;
stop_loss_margin = 1.0;
max_loss_times = 2;
pairs = ( "ni1906", "ni1907" );
}
);
data_file = [
// "/running/2019-05-10/data_binary.dat",
"/running/2019-05-20/data_binary.dat"
];

matcher_mode = "c++";
start_date = "2018-11-28";
period = 300;
matcher_mode = "python";
message_line = 100000;

order_file = "order.dat";
exchange_file = "exchange.dat";
strat_file = "mid.dat";
Loading

0 comments on commit c162c4c

Please sign in to comment.