/allaccess/scans-and-alerts/trade-optimizer?symbol={symbol}&target_date={target_date}&target_stock_price={target_stock_price}&account_type={account_type}&min_profit={min_profit}&max_loss={max_loss}&min_spread_width={min_spread_width}&max_spread_width={max_spread_width}&min_gap_width={min_gap_width}&max_gap_width={max_gap_width}
Live (15 points)
https://api.livevol.com/v1/live/allaccess/scans-and-alerts/trade-optimizer?symbol=A&target_date=2022-01-21&target_stock_price=100.71&account_type=cash_account&min_profit=100&max_loss=1000&min_spread_width=0.5&max_spread_width=10&min_gap_width=0.5&max_gap_width=10
Delayed (15 points)
https://api.livevol.com/v1/delayed/allaccess/scans-and-alerts/trade-optimizer?symbol=A&target_date=2022-01-21&target_stock_price=100.71&account_type=cash_account&min_profit=100&max_loss=1000&min_spread_width=0.5&max_spread_width=10&min_gap_width=0.5&max_gap_width=10
Name | Description | Type | Additional information |
---|---|---|---|
symbol |
Symbol |
string |
Required |
target_date |
Target Date |
string |
Required DateTime in yyyy-MM-dd format. (i.e. 2023-09-23) |
target_stock_price |
Target Stock Price |
decimal number |
Required Range: inclusive between 0 and 1.79769313486232E+308 |
account_type |
Account Type |
string |
Allowed values are [ cash_account, regt ] |
min_profit |
Min Profit |
decimal number |
Range: inclusive between 0 and 1.79769313486232E+308 |
max_loss |
Maximum loss of trade |
decimal number |
Range: inclusive between 0 and 1.79769313486232E+308 |
min_spread_width |
Min Spread Width |
decimal number |
Range: inclusive between 0 and 1.79769313486232E+308 |
max_spread_width |
Max Spread Width |
decimal number |
Range: inclusive between 0 and 1.79769313486232E+308 |
min_gap_width |
Min Gap Width |
decimal number |
Range: inclusive between 0 and 1.79769313486232E+308 |
max_gap_width |
Min Gap Width |
decimal number |
Range: inclusive between 0 and 1.79769313486232E+308 |
Collection of TradeOptimizerResult
Name | Description | Type | Additional information |
---|---|---|---|
timestamp |
Timestamp |
string |
None |
symbol |
Stock symbol |
string |
None |
target_date |
Date used to evaluate strategy payoff. Must be valid option expiry. |
string |
None |
target_stock_price |
Target stock price |
decimal number |
None |
strategy |
Strategy evaluated |
string |
Covered Call, Long Spread (C/P), Short Spread (C/P), Naked Long (C/P), Naked Short (C/P), Long Butterfly (C/P), Short Butterfly (C/P), Long Condor (C/P), Short Condor (C/P), Long Iron Condor, Short Iron Condor, Long Iron Butterfly, Short Iron Butterfly, Long Stock, Short Stock |
root |
Underlying root |
string |
None |
expiry |
Expiration date |
string |
Value is not applicable for Long/Short Stock strategy |
strike1 |
Strike of first leg |
decimal number |
None |
strike2 |
Strike of second leg |
decimal number |
None |
strike3 |
Strike of third leg |
decimal number |
None |
strike4 |
Strike of fourth leg |
decimal number |
None |
type1 |
C (Call), P (Put), or S (Stock) of the first leg |
string |
None |
type2 |
C (Call), P (Put), or S (Stock) of the second leg |
string |
None |
type3 |
C (Call), P (Put), or S (Stock) of the third leg |
string |
None |
type4 |
C (Call), P (Put), or S (Stock) of the fourth leg |
string |
None |
current_price |
Current price of option strategy or stock |
decimal number |
None |
future_price |
Future price of option strategy or stock |
decimal number |
None |
profit |
Profit represented as (Future Price - Current Price) * 100 |
decimal number |
None |
regt_margin |
Reg T Margin amount |
decimal number |
None |
return |
Returns at target, expressed as a decimal. Represented as profit / regt_margin |
decimal number |
None |
prob_itm |
Probability of option strategy falling ITM |
decimal number |
For stocks, this value is 0. |
annualized_return |
Annualized Return, expressed as a decimal |
decimal number |
None |
prob_of_profit |
Probability that strategy is profitable on target date |
decimal number |
None |
prob_of_tgt_price |
Probability that target price is met or exceeded on target date |
decimal number |
None |
price1 |
Price of strike1 |
decimal number |
None |
price2 |
Price of strike2 |
decimal number |
None |
price3 |
Price of strike3 |
decimal number |
None |
price4 |
Price of strike4 |
decimal number |
None |
order1 |
B (buy) or S (sell) of the first leg |
string |
None |
order2 |
B (buy) or S (sell) of the second leg |
string |
None |
order3 |
B (buy) or S (sell) of the third leg |
string |
None |
order4 |
B (buy) or S (sell) of the fourth leg |
string |
None |
underlying_price |
Price of underlying |
decimal number |
None |
account_type |
Account Type |
string |
None |
max_loss |
Maximum loss of trade |
decimal number |
None |
spread_width |
Difference between strike1 and strike2 |
decimal number |
None |
gap_width |
Difference between strike2 and strike3 |
decimal number |
Applicable to Condor and Butterfly strategies |
cash_acct_cmmt |
Cash account commitment |
decimal number |
Applicable to Long (C/P), Short Put, Covered Call and Long Stock |
[
{
"timestamp": "5/6/2018 9:30:00 AM",
"symbol": "AAPL",
"target_date": "5/6/2018 12:00:00 AM",
"target_stock_price": 200.0,
"strategy": "Covered Call",
"root": "AAPL",
"expiry": "6/15/2018 12:00:00 AM",
"strike1": 250.0,
"strike2": 0.0,
"strike3": 0.0,
"strike4": 0.0,
"type1": "C",
"type2": "",
"type3": "",
"type4": "",
"current_price": 174.07,
"future_price": 199.9651,
"profit": 25.8951,
"regt_margin": 174.07,
"return": 0.1488,
"prob_itm": 0.0013,
"annualized_return": 0.0,
"prob_of_profit": 0.0,
"prob_of_tgt_price": 0.0,
"price1": 0.0,
"price2": 0.0,
"price3": 0.0,
"price4": 0.0,
"order1": "S",
"order2": "",
"order3": "",
"order4": "",
"underlying_price": 200.0,
"account_type": "cash_account",
"max_loss": 100.0,
"spread_width": 0.0,
"gap_width": 0.0,
"cash_acct_cmmt": 17407.0
},
{
"timestamp": "5/6/2018 9:30:00 AM",
"symbol": "AAPL",
"target_date": "5/6/2018 12:00:00 AM",
"target_stock_price": 200.0,
"strategy": "Naked Long",
"root": "AAPL",
"expiry": "6/15/2018 12:00:00 AM",
"strike1": 210.0,
"strike2": 0.0,
"strike3": 0.0,
"strike4": 0.0,
"type1": "P",
"type2": "",
"type3": "",
"type4": "",
"current_price": 0.25,
"future_price": 3.3935,
"profit": 3.1435,
"regt_margin": 0.25,
"return": 12.5741,
"prob_itm": 0.0563,
"annualized_return": 0.0,
"prob_of_profit": 0.0,
"prob_of_tgt_price": 0.0,
"price1": 0.0,
"price2": 0.0,
"price3": 0.0,
"price4": 0.0,
"order1": "B",
"order2": "",
"order3": "",
"order4": "",
"underlying_price": 200.0,
"account_type": "cash_account",
"max_loss": 100.0,
"spread_width": 0.0,
"gap_width": 0.0,
"cash_acct_cmmt": 25.0
}
]
<trade_optimizer_results xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<trade_optimizer_result>
<account_type>cash_account</account_type>
<annualized_return>0</annualized_return>
<cash_acct_cmmt>17407</cash_acct_cmmt>
<current_price>174.07</current_price>
<expiry>6/15/2018 12:00:00 AM</expiry>
<future_price>199.9651</future_price>
<gap_width>0</gap_width>
<max_loss>100</max_loss>
<order1>S</order1>
<order2></order2>
<order3></order3>
<order4></order4>
<price1>0</price1>
<price2>0</price2>
<price3>0</price3>
<price4>0</price4>
<prob_itm>0.0013</prob_itm>
<prob_of_profit>0</prob_of_profit>
<prob_of_tgt_price>0</prob_of_tgt_price>
<profit>25.8951</profit>
<regt_margin>174.07</regt_margin>
<return>0.1488</return>
<root>AAPL</root>
<spread_width>0</spread_width>
<strategy>Covered Call</strategy>
<strike1>250</strike1>
<strike2>0</strike2>
<strike3>0</strike3>
<strike4>0</strike4>
<symbol>AAPL</symbol>
<target_date>5/6/2018 12:00:00 AM</target_date>
<target_stock_price>200</target_stock_price>
<timestamp>5/6/2018 9:30:00 AM</timestamp>
<type1>C</type1>
<type2></type2>
<type3></type3>
<type4></type4>
<underlying_price>200</underlying_price>
</trade_optimizer_result>
<trade_optimizer_result>
<account_type>cash_account</account_type>
<annualized_return>0</annualized_return>
<cash_acct_cmmt>25</cash_acct_cmmt>
<current_price>0.25</current_price>
<expiry>6/15/2018 12:00:00 AM</expiry>
<future_price>3.3935</future_price>
<gap_width>0</gap_width>
<max_loss>100</max_loss>
<order1>B</order1>
<order2></order2>
<order3></order3>
<order4></order4>
<price1>0</price1>
<price2>0</price2>
<price3>0</price3>
<price4>0</price4>
<prob_itm>0.0563</prob_itm>
<prob_of_profit>0</prob_of_profit>
<prob_of_tgt_price>0</prob_of_tgt_price>
<profit>3.1435</profit>
<regt_margin>0.25</regt_margin>
<return>12.5741</return>
<root>AAPL</root>
<spread_width>0</spread_width>
<strategy>Naked Long</strategy>
<strike1>210</strike1>
<strike2>0</strike2>
<strike3>0</strike3>
<strike4>0</strike4>
<symbol>AAPL</symbol>
<target_date>5/6/2018 12:00:00 AM</target_date>
<target_stock_price>200</target_stock_price>
<timestamp>5/6/2018 9:30:00 AM</timestamp>
<type1>P</type1>
<type2></type2>
<type3></type3>
<type4></type4>
<underlying_price>200</underlying_price>
</trade_optimizer_result>
</trade_optimizer_results>