November 2019
Beginner
394 pages
10h 31m
English
Let's execute a strategy for the StatArb signal using the following steps:
if ((final_delta_projected < StatArb_VALUE_FOR_SELL_ENTRY and abs(close_price - last_sell_price) > MIN_PRICE_MOVE_FROM_LAST_TRADE) # StatArb above sell entry threshold, we should sell or (position > 0 and (open_pnl > MIN_PROFIT_TO_CLOSE))): # long from negative StatArb and StatArb has gone positive or position is profitable, sell to close position orders.append(-1) # mark the sell trade last_sell_price = close_price position -= NUM_SHARES_PER_TRADE ...