-
-
Notifications
You must be signed in to change notification settings - Fork 269
/
thetagang.toml
618 lines (542 loc) · 25.4 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
# 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 ratio 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).
#
# In other words, ThetaGang's buying power is calculated by taking your NLV and
# multiplying it by margin_usage.
margin_usage = 0.5
# Market data type (see
# https://interactivebrokers.github.io/tws-api/market_data_type.html)
market_data_type = 1
[constants]
# Refer to `durationString` at
# https://interactivebrokers.github.io/tws-api/historical_bars.html for details.
# Valid values include "30 D", "60 D", "6 M", "1 Y", etc.
daily_stddev_window = "30 D"
# Optionally, specify a write threshold either as percent, or sigma, either for
# all contracts, or separately for puts/calls. Refer to the comments for
# `write_threshold` and `write_threshold_sigma` under `symbols` for details.
#
# # Applies to both puts and calls
# write_threshold = 0.01 # 1%
# write_threshold_sigma = 1.0 # 1𝜎
# [puts] # Applies only to puts
# write_threshold = 0.01 # 1%
# write_threshold_sigma = 1.0 # 1𝜎
# [calls] # Applies only to calls
# write_threshold = 0.01 # 1%
# write_threshold_sigma = 1.0 # 1𝜎
[orders]
# The exchange to route orders to. Can be overridden if desired. This is also
# used for fetching tickers/prices.
exchange = "SMART"
# Range of time to delay, in seconds, before resubmitting an order with updated
# midpoint price if `symbol.<symbol>.adjust_price_after_delay = true`.
price_update_delay = [30, 60]
# Set a minimum credit order price, to avoid orders where the credit (or debit)
# is so low that it doesn't even cover broker commission. We default to $0.05,
# but you can set this to 0.0 (or comment it out) if you want to permit any
# order price. This doesn't apply to debit orders.
minimum_credit = 0.05
[orders.algo]
# By default we use adaptive orders with patient priority which gives reasonable
# results. You can also experiment with TWAP or other options, however the
# available order algos vary depending on what you trade.
#
# Note that the algo orders don't seem to work with combo orders, which are used
# when rolling positions, so AFAIK this has no effect for those orders. It only
# seems to take effect with regular open/close orders.
# Optional IBKR algo strategy. See
# https://interactivebrokers.github.io/tws-api/ibalgos.html for option details.
strategy = "Adaptive"
# For `algoParams`, the TagValue parameter has 2 values, so any values with
# anything other than 2 parameters are invalid. Pass an empty list to use the
# defaults (i.e., params = []).
params = [
[
"adaptivePriority",
"Patient",
],
]
[option_chains]
# The option chains are lazy loaded, and before you can determine the greeks
# (delta) or prices, you need to scan the chains. The settings here tell
# thetagang how many contracts to load. Don't make these values too high, as
# they will cause the chain scanning process to take too long, and it may fail.
#
# If you have issues where thetagang can't find suitable contracts, try
# increasing these values slightly.
#
# Number of expirations to load from option chains
expirations = 4
# Number of strikes to load from option chains
strikes = 15
[roll_when]
# Roll when P&L reaches 90%
pnl = 0.9
# Or, roll options when there are <= 15 days to expiry and P&L is at least
# min_pnl (min_pnl defaults to 0)
#
# NOTE: For cases where an option ends up deep ITM, notably when selling
# covered calls, it's possible that the P&L would be significantly negative,
# i.e., -100%. If you want to roll anyway in these situations, set min_pnl to a
# negative value such as -1 (for -100%).
dte = 15
min_pnl = 0.0
# Optional: Don't roll contracts when the current DTE is greater than this
# number of days. This helps avoid cases where you end up rolling out to LEAPs.
#
# max_dte = 180
# Optional: Create a closing order when the P&L reaches this threshold. This
# overrides the other parameters, i.e., it ignores DTE and everything else.
# If not specified, it has no effect. This can handle the case where you have
# long-dated options that have slowly become worthless and you just want to get
# them out of your portfolio. This only applies to short contract positions,
# long positions are ignored.
#
# close_at_pnl = 0.99
# Optional: if we try to roll the position and it fails, just close it (but only
# if the position currently has positive P&L). This can happen if the underlying
# moves too much and there are no suitable contracts. See
# https://github.com/brndnmtthws/thetagang/issues/347 and
# https://github.com/brndnmtthws/thetagang/issues/439 for a discussion on this.
#
# If `roll_when.max_dte` is set, this will only close the position if the DTE is
# <= `roll_when.max_dte`.
#
# This can also be set per-symbol, with
# `symbols.<symbol>.close_if_unable_to_roll`.
close_if_unable_to_roll = false
[roll_when.calls]
# Roll calls to the next expiration even if they're in the money. Defaults to
# true if not specified.
itm = true
# Always roll calls (short-circuit) when they're in the money, regardless of
# the P&L. This allows you to avoid assignment risk by eating the cost of
# rolling the calls. This is useful if you want to avoid assignment risk
# either because you don't own the underlying (i.e., with spreads) or because
# you don't want to realize a gain/loss yet. Note that if it's rolling early
# (i.e., before `roll_when.dte`) it may only roll a subset of the contracts
# based on the `target.maximum_new_contracts_percent` value.
#
# This can also be set for puts with `roll_when.puts.always_when_itm`. This
# option, when enabled, takes precedence over `roll_when.pnl` and
# `roll_when.min_pnl`.
always_when_itm = false
# Only roll when there's a suitable contract available that will result in a
# credit. Enabling this may result in the target delta value being ignored in
# circumstances where we can't find a contract that will result in both a
# credit _and_ satisfying the target delta (i.e., having a credit takes
# precedence).
credit_only = false
# If set to false, calls will not be rolled if there are any number of calls in
# excess of the target call quantity. A truthy value means thetagang will keep
# rolling calls regardless of the total quantity.
has_excess = true
# We can optionally maintain the high water mark for covered calls by never
# rolling CCs down, only out. We do this because it's not uncommon for a sharp
# bounce up after a stock/index falls enough to make the contract eligible for
# rolling. If we roll the CC down and out, we might be capping our gains when it
# eventually does bounce back. The trade off here is that you end up with
# slightly less downside protection.
#
# This only applies to rolling calls, and is essentially equivalent to setting
# the minimum strike of the next contract to the previous strike and only
# allowing the value to ratchet upwards.
#
# While this is off by default, it would be sensible to turn it on if you're
# trying to capture upside, rather than protect downside.
#
# This value can also be set per-symbol, with
# `symbols.<symbol>.calls.maintain_high_water_mark` (see `symbols.QQQ` example
# below).
maintain_high_water_mark = false
[roll_when.puts]
# Roll puts if they're in the money. Defaults to false if not specified.
itm = false
# See comments above for `roll_when.calls.always_when_itm` for details on this
# option (which behaves the same for puts as with calls).
always_when_itm = false
# Only roll when there's a suitable contract available that will result in a
# credit. Enabling this may result in the target delta value being ignored in
# circumstances where we can't find a contract that will result in both a
# credit _and_ satisfying the target delta (i.e., having a credit takes
# precedence).
credit_only = false
# If set to false, puts will not be rolled if there are any number of puts in
# excess of the target put quantity. A truthy value means thetagang will keep
# rolling puts regardless of the total quantity.
has_excess = true
[write_when]
# By default, we ignore long option positions when calculating whether we can
# write new contracts. This, however, limits the ability to utilize spreads. For
# example, we might want to buy some long-dated puts when they're cheap, and
# then we can sell additional short-dated puts (i.e., a calendar spread).
# ThetaGang won't open a calendar spread for you by purchasing longer-dated
# contracts, but if you were to buy some LEAPs yourself, ThetaGang could take
# advantage of those positions when calculating whether to write additional
# contracts.
#
# If you set this value to true, ThetaGang will calculate the net positions by
# including the long contracts in its calculations. It does this by greedily
# matching short positions with long positions such that they cancel each other
# out. ThetaGang will only match on those positions where the long leg has a
# greater DTE, and the strike is closer to the money (i.e., the strike for puts
# must be >=, and the strike for calls must be <=).
#
# IMPORTANT NOTE: ThetaGang doesn't manage long contracts at all, so you
# introduce the risk of having excess short positions when the long contracts
# eventually expire. For the time being, you need to manage the long legs
# yourself (by either closing the short side when the long positions expire, or
# rolling the long positions as they approach expiration). You can avoid rolling
# excess positions with `roll_when.calls/puts.has_excess = false`.
calculate_net_contracts = false
[write_when.calls]
# Optionally, only write calls when the underlying is green
green = true
red = false
# With covered calls, we can cap the number of calls to write by this factor. At
# 1.0, we write covered calls on 100% of our positions. At 0.5, we'd only write
# on 50% of our positions. This value must be between 1 and 0 inclusive.
#
# This can also be set per-symbol with
# `symbols.<symbol>.calls.cap_factor`.
cap_factor = 1.0
# We may want to leave some percentage of our underlying stock perpetually
# uncovered so we don't miss out on big upside movements. For example, if our
# target number of shares for a given symbol is 1,000, we may want to ensure
# 500 shares are _always_ uncovered. This is a bit different from `cap_factor`,
# as it applies to the _target_ number of shares, as opposed to the current
# positions. A value of 0.5 (50%) means that we always leave 50% (half) of the
# target shares uncovered. A bigger number (up to 1.0, 100%) is more bullish,
# and a smaller number (down to 0.0, 0%) is more bearish (i.e., cover all
# positions with calls). This essentially sets a floor on the number of shares
# we try to hold on to in order to avoid missing out on potential upside.
#
# This can also be set per-symbol with
# `symbols.<symbol>.calls.cap_target_floor`.
cap_target_floor = 0.0
# If set to true, calls are only written on the underlying when the underlying
# has an excess of shares. This is useful for covered calls, where you only
# want to write calls when you have more shares than you want to hold
# long-term. It also provides a way to rebalance your portfolio by writing
# calls and taking profits.
#
# This may also be set per-symbol with `symbols.<symbol>.calls.excess_only`,
# which takes precedence.
#
# When this is set to true, the `cap_factor` and `cap_target_floor` values are
# ignored.
excess_only = false
[write_when.puts]
# Optionally, only write puts when the underlying is red
green = false
red = true
[target]
# Target 45 or more days to expiry
# This value can also be set per-symbol, with `symbols.<symbol>.dte`
# (see `symbols.QQQ` example below).
dte = 45
# Optionally, we can prevent contracts from being rolled insanely far out with
# `target.max_dte`. Comment this setting out if you don't care about it. You can
# also specify this per-symbol, with `symbols.<symbol>.max_dte`, or for VIX if
# you use the VIX call hedging.
max_dte = 180
# Target delta of 0.3 or less. Defaults to 0.3 if not specified.
delta = 0.3
# When writing new contracts (either covered calls or naked puts), or rolling
# before `roll_when.dte` is reached, never write more than this amount of
# contracts at once. This can be useful to avoid bunching by spreading contract
# placement out over time (and possibly expirations) in order to protect
# yourself from large swings. This value does not affect rolling existing
# contracts to the next expiration. This value is expressed as a percentage of
# buying power based on the market price of the underlying ticker, as a range
# from [0.0-1.0].
#
# Once the `roll_when.dte` date is reached, all the remaining positions are
# rolled regardless of the current position quantity.
#
# Defaults to 5% of buying power. Set this to 1.0 to effectively disable the
# limit.
maximum_new_contracts_percent = 0.05
# Minimum amount of open interest for a contract to qualify
minimum_open_interest = 10
# Optional: specify delta separately for puts/calls. Takes precedent over
# target.delta.
#
# [target.puts]
# delta = 0.5
# [target.calls]
# delta = 0.3
[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 can specify the weight either as a percentage of your buying power (which
# is calculated as your NLV * account.margin_usage), or in terms of parts. Parts
# are summed from all symbols, then the weight is calculated by dividing the
# parts by the total parts.
#
# 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
#
# The target delta may also be specified per-symbol, and takes precedence over
# `target.delta` or `target.puts/calls.delta`. You can specify a value for the
# symbol, or override individually for puts/calls.
[symbols.SPY]
weight = 0.4
# OR: specify in terms of parts. Must use either weight or parts, but cannot mix
# both.
# parts = 40
# Sometimes, particularly for stocks/ETFs with limited liquidity, the spreads
# are too wide to get an order filled at the midpoint on the first attempt. For
# those, you can try setting this to `true`, and thetagang will wait a random
# amount of time, then resubmit orders that haven't filled (but only for the
# symbols with this set to true). The amount of time we'll wait is chosen
# randomly from the range defined by `orders.price_update_delay`.
adjust_price_after_delay = false
# You can include a symbol, but instruct ThetaGang not to place any trades for
# that symbol by setting `no_trading = true`. This allows you to include
# placeholders (such as for tracking purposes, or because you want to trade
# manually) without actually trading them.
#
# no_trading = true
[symbols.QQQ]
weight = 0.3
# The target DTE may also be specified per-symbol, and takes precedence over
# `target.dte`
dte = 60
# Optional: specify the maximum contract DTE for this symbol (i.e., don't open
# or roll positions past this DTE). This will override the `target.max_dte`
# value.
# max_dte = 45
# Optional: If we try to roll the position and it fails, just close it (but
# only if it's profitable).
close_if_unable_to_roll = true
# parts = 30
[symbols.QQQ.puts]
# Override delta just for QQQ puts
delta = 0.5
# Also, optionally specify a strike limit, for either puts or calls.
# Interpreted as an upper bound for puts, and a lower bound for calls.
strike_limit = 1000.0 # never write a put with a strike above $1000
# Optionally, if we only write new contracts when the underlying is green or
# red (`write_when.*.green=true` && `write_when.*.red=false` or vice versa),
# specify a minimum threshold as an absolute value daily percentage change
# (in this example, use 1% for puts only, but could also be specified as
# `symbols.QQQ.write_threshold`). This can also be specified under
# `constants.write_threshold` and `constants.puts/calls.write_threshold` to
# apply to all symbols, either for both puts or calls, or individually.
#
# In this example, we'd only write puts on QQQ when the daily change is -1% or
# greater (provided that we also set `write_when.puts.red=true`).
write_threshold = 0.01 # 1%, absolute value
# Alternatively, you can express write threshold value in terms of sigma with
# `write_threshold_sigma`. A value of 2.0 means that we'll write new contracts
# when the daily change is twice the standard deviation of the log returns.
#
# If write_threshold_sigma is specified, it supersedes (overrides) the value of
# write_threshold.
#
# The daily standard deviation of log returns is calculated based on the past
# 30 days of data by default, but you can adjust this by altering the value of
# `constants.daily_stddev_window`.
#
# Note that we'll need to retrieve this historical data for every execution to
# calculate this value, so you should be sure there's 1) sufficient history
# available and 2) the data can be retrieved sufficiently fast.
#
# write_threshold_sigma = 1.0 # 1x the standard devation of log returns for the daily stddev window
# the values for `write_when.*.green` and `write_when.*.red` can also be set per-symbol
[symbols.QQQ.puts.write_when]
green = false
red = true
[symbols.QQQ.calls]
strike_limit = 100.0 # never write a call with a strike below $100
maintain_high_water_mark = true # maintain the high water mark when rolling calls
# These values can (optionally) be set on a per-symbol basis, in addition to
# `write_when.calls.cap_factor` and `write_when.calls.cap_target_floor.
cap_factor = 1.0
cap_target_floor = 0.0
# Optionally, only write calls when the underlying has an excess of shares
# when set to `true`. This overrides the `write_when.calls.excess_only`
# value.
excess_only = false
[symbols.TLT]
weight = 0.2
# parts = 20
# Override delta for this particular symbol, for both puts and calls.
delta = 0.4
[symbols.ABNB]
# For symbols that require an exchange, which is typically any company stock,
# you must specify the primary exchange.
primary_exchange = "NASDAQ"
weight = 0.05
# parts = 5
# Sometimes you may need to wrap the symbol in quotes.
[symbols."BRK B"]
# For symbols that require an exchange, which is typically any company stock,
# you must specify the primary exchange.
primary_exchange = "NYSE"
weight = 0.05
# parts = 5
[ib_async]
logfile = '/etc/thetagang/ib_async.log'
# Typically the amount of time needed when waiting on data from the IBKR API.
# Sometimes it can take a while to retrieve data, and it's lazy-loaded by the
# API, so getting this number right is largely a matter of guesswork.
# Increasing the number would reduce the throughput since we have to wait maximum X seconds
# to make sure all the required data fields are ready.
# You can speed up the thetagang by reducing this number, but you may miss the best opportunities.
# The rule of thumb to choose the best value is assuming the maximum run time of thetagang
# will be around 6 (call,puts,roll calls, roll puts, ...) * api_response_wait_time * number_of_symbols you have in the configuration.
api_response_wait_time = 60
[ibc]
# IBC configuration parameters. See
# https://ib-insync.readthedocs.io/api.html#ibc for details.
gateway = true
ibcPath = '/opt/ibc'
tradingMode = 'paper'
# Set this to true if you want to raise an exception on request errors. Under
# normal operation this should be false because we often try to make "invalid"
# requests when scanning option chains for example.
RaiseRequestErrors = false
password = 'demo'
userid = 'demo'
# Change this to point to your config.ini for IBC
ibcIni = '/etc/thetagang/config.ini'
# Change or unset this to use something other than the Docker bundled OpenJDK.
javaPath = '/opt/java/openjdk/bin'
# twsPath = ''
# twsSettingsPath = ''
# 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 = 7497
probeTimeout = 4
readonly = false
retryDelay = 2
[watchdog.probeContract]
currency = 'USD'
exchange = 'SMART'
secType = 'STK'
symbol = 'SPY'
# Optional VIX call hedging, based on the methodology described by the Cboe VIX
# Tail Hedge Index, described here:
# https://www.cboe.com/us/indices/dashboard/vxth/
[vix_call_hedge]
enabled = false
# Target delta for calls that are purchased
delta = 0.30
# Target DTE for new positions
target_dte = 30
# Optionally specify a maximum DTE for VIX positions, which takes precedence
# over `target.max_dte`.
# max_dte = 180
# If the current spot VIX exceeds this value, long VIX call positions will be
# closed. Comment out to disable.
close_hedges_when_vix_exceeds = 50.0
# Don't count any VIX positions where the DTE is <= this value. Increase this
# value to create a call ladder. For example, if you set this to 5, thetagang
# will ignore current VIX positions starting 5 days before expiry, and
# potentially adding more. This allows you to create a simple call ladder.
ignore_dte = 0
# The allocations are specified as an ordered list of allocation weights
# according to an upper/lower bound on VIXMO (the 30 day VIX). Default values
# are the same as those described in the VXTH methodology. These are evaluated
# in order, and the weight from the first allocation that matches will be
# applied. The lower bound is inclusive, and the upper bound is exclusive
# (.i.e., the code checks that lower <= VIXMO < upper). The upper/lower bounds
# are only checked if they're present.
#
# The allocation weights are multiplied by the account's net liquidation value,
# and that amount is allocated to purchasing VIX calls.
[[vix_call_hedge.allocation]]
upper_bound = 15.0
weight = 0.00
[[vix_call_hedge.allocation]]
lower_bound = 15.0
upper_bound = 30.0
weight = 0.01
[[vix_call_hedge.allocation]]
lower_bound = 30.0
upper_bound = 50.0
weight = 0.005
[[vix_call_hedge.allocation]]
lower_bound = 50.0
weight = 0.00
[cash_management]
# Cash management gives us a way to earn a little extra yield from excess cash
# sitting in your account. When the cash balance exceeds a threshold, we buy
# the cash fund, and when the cash balance drops below the cash threshold we
# sell the cash fund to get back to the target cash balance.
#
# Enables cash management
enabled = false
# The fund to purchase with your cash. Example of cash funds are SGOV or SHV,
# which are short-term treasury ETFs with reasonable fees. Be sure to check the
# expense ratio before jumping in on ETFs that appear juicier.
cash_fund = "SGOV"
# You don't usually need to specify the primary exchange for ETFs, but if you
# do, you can do so with this:
# primary_exchange = "NYSE"
# The cash balance to target. This is used as a lower bound, so with a value of
# 0, we try not to let the cash balance go below zero. Simple enough.
target_cash_balance = 0
# We don't want to transact too frequently because of commissions, so the buy
# threshold is the amount above target_cash_balance we need to reach before
# placing a buy order.
buy_threshold = 10000
# The sell threshold is the amount below target_cash_balance where we'll place
# a sell order to shore up cash.
sell_threshold = 10000
[cash_management.orders]
# The exchange to route orders to. Can be overridden if desired. This is also
# used for fetching tickers/prices.
exchange = "SMART"
[cash_management.orders.algo]
# By default, use a VWAP order for cash trades. You can comment out the whole
# `cash_management.orders` section to use the same value as `orders` and
# `orders.algo`.
params = [
# Optionally, uncomment the following line to be opportunistic by avoiding
# taking liquidity. This gives us somewhat better pricing and lower
# commissions, at the expense of possibly not getting the order filled in
# the day.
# ["noTakeLiq", "1"],
]
strategy = "Vwap"