Skip to content

Commit

Permalink
upload
Browse files Browse the repository at this point in the history
  • Loading branch information
nickhuangxinyu1 committed Jun 5, 2020
2 parents 6cbc2bc + 2142b4a commit 1b01f30
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 6 deletions.
136 changes: 136 additions & 0 deletions config/backtest/all_backtest.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
fixed_path="/home/nick/future";
backtest_outputdir = "backtest_plot";
strategy = (
{
unique_name = "IC";
ticker = "IC";
split_num = 6;
max_position = 1;
max_round = 4000;
range_width = 1.5;
train_samples = 600;
min_range = 4.0;
min_profit = 1.0;
add_margin = 3.0;
spread_threshold = 500.0;
max_holding_sec = 360000000;
stop_loss_margin = 10.0;
max_loss_times = 2;
no_close_today = true;
},
{
unique_name = "IH";
split_num = 6;
ticker = "IH";
max_position = 1;
max_round = 1000;
range_width = 2.0;
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;
no_close_today = true;
},
{
unique_name = "IF";
ticker = "IF";
max_position = 1;
max_round = 1000;
range_width = 2.0;
train_samples = 600;
min_range = 4.0;
min_profit = 1.0;
add_margin = 3.0;
spread_threshold = 3.0;
split_num = 6;
max_holding_sec = 360000000;
stop_loss_margin = 10.0;
max_loss_times = 2;
no_close_today = true;
},

{
unique_name = "cu";
ticker = "cu";
max_position = 1;
max_round = 1000;
tick_size = 10.0;
range_width = 2.0;
contract_size = 5;
train_samples= 600;
cancel_threshhold = 1000000000;
split_num = 6;
min_range = 4.0;
min_profit = 1.0;
add_margin = 1.0;
spread_threshold = 3.0;
max_holding_sec = 3600000;
stop_loss_margin = 3.0;
max_loss_times = 2;
},

{
unique_name = "ni";
ticker = "ni";
max_position = 1;
max_round = 1000;
range_width = 1.0;
train_samples = 600;
min_range = 3.0;
split_num = 6;
min_profit = 1.0;
add_margin = 3.0;
spread_threshold = 3.0;
max_holding_sec = 3600000;
stop_loss_margin = 300.0;
max_loss_times = 2;
},

{
unique_name = "sn";
ticker = "sn";
max_position = 1;
max_round = 1000;
range_width = 2.0;
train_samples = 600;
min_range = 4.0;
min_profit = 1.0;
split_num = 6;
add_margin = 3.0;
spread_threshold = 3.0;
max_holding_sec = 3600000;
stop_loss_margin = 3.0;
max_loss_times = 2;
},

{
unique_name = "au";
ticker = "au";
max_position = 1;
max_round = 1000;
range_width = 2.0;
train_samples = 600;
min_range = 2.0;
min_profit = 1.0;
split_num = 6;
add_margin = 1.0;
spread_threshold = 3.0;
max_holding_sec = 3600000;
stop_loss_margin = 3.0;
max_loss_times = 2;
}
);

// start_date = "today";
// start_date = "yesterday";
test_mode = "nexttest";
start_date = "2019-11-01";
period = 10;

order_file = "order_backtest.dat";
exchange_file = "exchange_backtest.dat";
strat_file = "mid_backtest.dat";
2 changes: 1 addition & 1 deletion config/contract/bk_contract.config
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ map = (
is_fixed_close_fee_rate = true;
open_fee = 3.5;
close_today_fee= 0.0;
close_fee= 6.0;
close_fee= 3.5;
},
{
ticker = "pb";
Expand Down
6 changes: 3 additions & 3 deletions config/contract/contract.config
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,9 @@ ni = {
is_fixed_open_fee_rate = true;
is_fixed_close_today_fee_rate = true;
is_fixed_close_fee_rate = true;
open_fee = 6.0;
close_today_fee= 6.0;
close_fee= 6.0;
open_fee = 3.5;
close_today_fee= 0.0;
close_fee= 3.5;
};

pb = {
Expand Down
4 changes: 2 additions & 2 deletions config/prod/prod.config
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ strategy = (
{
unique_name = "ni";
max_position = 3;
range_width = 2.0;
range_width = 1.0;
max_round = 40000;
train_samples = 600;
min_range = 4.0;
min_range = 2.0;
min_profit = 1.0;
add_margin = 3.0;
spread_threshold = 3.0;
Expand Down

0 comments on commit 1b01f30

Please sign in to comment.