forked from brndnmtthws/thetagang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
thetagang.toml
125 lines (104 loc) · 3.53 KB
/
thetagang.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# NOTE: It is STRONGLY recommended you read through all notes, config options,
# and documentation before proceeding. Be sure to update the configuration
# values according to your preferences. Additionally, any default values in
# this config do not constitute a recommendation or endorsement, or any provide
# claims abount returns or performance.
#
# Should you decide to use ThetaGang, please experiment with a paper trading
# account before trying on a live account.
[account]
# The account number to operate on
number = "DU1234567"
# Cancel any existing orders for the symbols configured at startup
cancel_orders = true
# Maximum amount of margin to use, as a percentage of net liquidation. IB lets
# you use varying amounts of margin, depending on the assets. To use up to 4x
# margin, set this to 4. It's recommended you always leave some additional
# cushion. IB will start to close positions if you go below certain thresholds
# of available margin in your account.
#
# For details on margin usage, see:
# https://www.interactivebrokers.com/en/index.php?f=24176
#
# The default value uses 50% of your available net liquidation value
# (i.e., half of your funds). Set this to 1.0 to use all your funds,
# or 1.5 to use 150% (which may incur margin interest charges).
margin_usage = 0.5
# Market data type (see
# https://interactivebrokers.github.io/tws-api/market_data_type.html)
market_data_type = 1
[option_chains]
# Number of expirations to load from option chains
expirations = 5
# Number of strikes to load from option chains
strikes = 50
[roll_when]
# Roll when P&L reaches 90%
pnl = 0.9
# Or when there are <= 15 days to expiry
dte = 15
[roll_when.calls]
# Roll calls to the next expiration even if they're in the money. Defaults to
# true if not specified.
itm = true
[roll_when.puts]
# Roll puts if they're in the money. Defaults to false if not specified.
itm = false
[target]
# Target 45 or more days to expiry
dte = 45
# Target delta of 0.3 or less
delta = 0.3
# Minimum amount of open interest for a contract to qualify
minimum_open_interest = 10
[symbols]
# NOTE: Please change these symbols and weights according to your preferences.
# These are provided only as an example for the purpose of configuration. These
# values were chosen as sane values should someone decide to run this code
# without changes, however it is in no way a recommendation or endorsement.
#
# You should try to choose ETFs or stocks that:
#
# 1) Have sufficient trading volume for the underlying
# 2) Have standard options contracts (100 shares per contract)
# 3) Have options with sufficient open interest and trading volume
[symbols.SPY]
weight = 0.4
[symbols.QQQ]
weight = 0.3
[symbols.TLT]
weight = 0.3
[ib_insync]
logfile = 'ib_insync.log'
[ibc]
# IBC configuration parameters. See
# https://ib-insync.readthedocs.io/api.html#ibc for details.
gateway = true
ibcPath = '/opt/ibc'
password = 'demo'
tradingMode = 'paper'
userid = 'demo'
# Change this to point to your config.ini for IBC
ibcIni = '/etc/thetagang/config.ini'
# twsPath = ''
# twsSettingsPath = ''
# javaPath = ''
# fixuserid = ''
# fixpassword = ''
[watchdog]
# Watchdog configuration params. See
# https://ib-insync.readthedocs.io/api.html#watchdog for details.
appStartupTime = 30
appTimeout = 20
clientId = 1
connectTimeout = 2
host = '127.0.0.1'
port = 4002
probeTimeout = 4
readonly = false
retryDelay = 2
[watchdog.probeContract]
currency = 'USD'
exchange = 'SMART'
secType = 'STK'
symbol = 'SPY'