Skip to content

Commit

Permalink
Fixes Broken Links
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexCatarino committed Aug 1, 2024
1 parent e70f50a commit 7244d47
Show file tree
Hide file tree
Showing 13 changed files with 118 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@
<p>To perform intensive computation before the market opens, use a <a href="/docs/v2/writing-algorithms/scheduled-events">Scheduled Event</a> or the <a href="/docs/v2/writing-algorithms/machine-learning/training-models#02-Train-Models"><span class="csharp">Train</span><span class="python">train</span></a> method.</p>

<p>
For more information on the <code>Slice</code> object and OnData event, see <a href="/docs/v2/writing-algorithms/securities/handling-data#03-Timeslice">Handling Data</a>.
For more information on the <code>Slice</code> object and OnData event, see <a href="/docs/v2/writing-algorithms/securities/handling-data#03-Data-Events">Handling Data</a>.
</p>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p>The default account currency is USD, but you can change it. All of the <a href="/docs/v2/writing-algorithms/portfolio/key-concepts#02-Properties">properties of the Portfolio object</a> that return a currency value denominate the currency value in your account currency. Depending on your account currency and security subscriptions, LEAN may add internal security subscriptions to calculate the <code class="csharp">ValueInAccountCurrency</code><code class="python">value_in_account_currency</code>. For example, if you only add BTCETH to your algorithm and set the account currency to USDT, LEAN adds BTCUSDT and ETHUSDT as internal feeds.</p>
<p>The default account currency is USD, but you can change it. All of the <a href="/docs/v2/writing-algorithms/portfolio/key-concepts#99-Properties">properties of the Portfolio object</a> that return a currency value denominate the currency value in your account currency. Depending on your account currency and security subscriptions, LEAN may add internal security subscriptions to calculate the <code class="csharp">ValueInAccountCurrency</code><code class="python">value_in_account_currency</code>. For example, if you only add BTCETH to your algorithm and set the account currency to USDT, LEAN adds BTCUSDT and ETHUSDT as internal feeds.</p>

<p>To get your account currency, use the <code class="csharp">AccountCurrency</code><code class="python">account_currency</code> property.</p>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p>To set the <a href="/docs/v2/writing-algorithms/securities/properties#50-Symbol-Properties">Symbol Properties</a> of the custom data, provide a <code>SymbolProperties</code> object when you subscribe to the dataset. The ticker you pass to the <code>SymbolProperties</code> constructor and the <code class='csharp'>AddData</code><code class='csharp'>add_data</code> method must be the same.</p>
<p>To set the <a href="/docs/v2/writing-algorithms/securities/key-concepts#06-Symbol-Properties">Symbol Properties</a> of the custom data, provide a <code>SymbolProperties</code> object when you subscribe to the dataset. The ticker you pass to the <code>SymbolProperties</code> constructor and the <code class='csharp'>AddData</code><code class='csharp'>add_data</code> method must be the same.</p>

<p>To set the <a href="/docs/v2/writing-algorithms/securities/exchange#03-Hours">Exchange Hours</a> of the custom data, provide a <code>SecurityExchangeHours</code> object when you subscribe to the dataset. The default hours are for the market to be open 24/7.</p>
<p>To set the <a href="/docs/v2/writing-algorithms/securities/market-hours">Exchange Hours</a> of the custom data, provide a <code>SecurityExchangeHours</code> object when you subscribe to the dataset. The default hours are for the market to be open 24/7.</p>

<div class="section-example-container">
<pre class="csharp">var ticker = "ABC";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p>
A <span class="new-term">Short Box Spread</span> is the inverse of a <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/box-spread">box spread</a>, as well as the combination of a <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/bear-call-spread">bear call spread</a> and a <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/bull-put-spread">bull put spread</a>.
A <span class="new-term">Short Box Spread</span> is the inverse of a <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/long-box-spread">box spread</a>, as well as the combination of a <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/bear-call-spread">bear call spread</a> and a <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/bull-put-spread">bull put spread</a>.
It consists of buying an OTM call at strike $A$, selling an ITM put at strike $A$, buying an OTM put and strike $B < A$, and selling an ITM call at strike $B$, where all of the contracts have the same expiry date.
This strategy serves as an delta-neutral arbitration from Option mispricing.
Note that it only attains a true profit when the risk-free return is greater than the <a href='/docs/v2/writing-algorithms/reality-modeling/risk-free-interest-rate/key-concepts'>risk-free interest rate</a>.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p>
A <span class="new-term">Short Jelly Roll</span>, or simply <span class="new-term">Short Roll</span>, is a combination of a <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/short-call-calendar-spread">short call calendar spread</a> and a <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/long-put-calendar-spread">long put calendar spread</a>.
It is the inverse of a <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/jelly-roll">jelly roll</a>.
It is the inverse of a <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/long-jelly-roll">jelly roll</a>.
It consist of selling a put and buying a call of the same expiry, as well as buying a put and selling a call with a further expiry, where all of the contracts have the same strike prices.
This strategy serves as an arbitrage on Option mispricing due to the temporary disparity between the call spread and the put spread synthetic portfolios.
It is a <a href='/docs/v2/writing-algorithms/securities/asset-classes/equity-options/greeks-and-implied-volatility/option-indicators#04-Delta'>delta</a>-, <a href='/docs/v2/writing-algorithms/securities/asset-classes/equity-options/greeks-and-implied-volatility/option-indicators#05-Gamma'>gamma</a>-, <a href='/docs/v2/writing-algorithms/securities/asset-classes/equity-options/greeks-and-implied-volatility/option-indicators#06-Vega'>vega</a>-, and <a href='/docs/v2/writing-algorithms/securities/asset-classes/equity-options/greeks-and-implied-volatility/option-indicators#07-Theta'>theta</a>-neutral strategy, but sensitive to <a href='/docs/v2/writing-algorithms/securities/asset-classes/equity-options/greeks-and-implied-volatility/option-indicators#08-Rho'>rho</a> (interest rate) and phi (<a href='/docs/v2/writing-algorithms/reality-modeling/dividend-yield/key-concepts'>dividend yield</a>).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p>
<span class="new-term">Bear put ladder</span>, also known as <span class="new-term">long put ladder</span>, is a combination of a <a href="/docs/writing-algorithms/trading-and-orders/option-strategies/bear-put-spread">bear put spread</a> and short put with a lower strike price than the 2 legs of the put spread.
<span class="new-term">Bear put ladder</span>, also known as <span class="new-term">long put ladder</span>, is a combination of a <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/bear-put-spread">bear put spread</a> and short put with a lower strike price than the 2 legs of the put spread.
All puts have the same underlying Equity and expiration date.
This strategy profits from low volatility of the underlying asset.
For instance, the underlying price stays similar to its current price.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p>
<span class="new-term">Bull call ladder</span>, also known as <span class="new-term">long call ladder</span>, is a combination of a <a href="/docs/writing-algorithms/trading-and-orders/option-strategies/bull-call-spread">bull call spread</a> and a short call with a higher strike price than the 2 legs of the call spread.
<span class="new-term">Bull call ladder</span>, also known as <span class="new-term">long call ladder</span>, is a combination of a <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/bull-call-spread">bull call spread</a> and a short call with a higher strike price than the 2 legs of the call spread.
All calls have the same underlying Equity and expiration date.
This strategy profits from low volatility of the underlying asset.
For instance, the underlying price stays similar to its current price.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@


<h4>Non-Tradable Security</h4>
<p>The <code class='csharp'>OrderResponseErrorCode.NonTradableSecurity</code><code class='python'>OrderResponseErrorCode.NON_TRADABLE_SECURITY</code> (-28) error occurs when you place an order for a security that's not <a href='/docs/v2/writing-algorithms/securities/key-concepts#07-Tradable-Status'>tradable</a>. To avoid this order response error, check if a security is tradable before you trade it.</p>
<p>The <code class='csharp'>OrderResponseErrorCode.NonTradableSecurity</code><code class='python'>OrderResponseErrorCode.NON_TRADABLE_SECURITY</code> (-28) error occurs when you place an order for a security that's not <a href='/docs/v2/writing-algorithms/securities/key-concepts#05-Tradable-Status'>tradable</a>. To avoid this order response error, check if a security is tradable before you trade it.</p>

<a id='non-exercisable-security'></a><div class="section-example-container">
<pre class="csharp">if (Securities[_symbol].IsTradable)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p>
Every day, the LEAN CLI updates the <a href="https://www.quantconnect.com/docs/v2/writing-algorithms/securities/exchange">exchange market hours</a> (<span class='public-file-name'>data / market-hours / market-hours-database.json</span>) and the <a href="https://www.quantconnect.com/docs/v2/writing-algorithms/securities/properties#50-Symbol-Properties">symbol properties</a> database (<span class='public-file-name'>data / symbol-properties / symbol-properties-database.csv</span>).
Every day, the LEAN CLI updates the <a href="https://www.quantconnect.com/docs/v2/writing-algorithms/securities/market-hours">exchange market hours</a> (<span class='public-file-name'>data / market-hours / market-hours-database.json</span>) and the <a href="https://www.quantconnect.com/docs/v2/writing-algorithms/securities/key-concepts#06-Symbol-Properties">symbol properties</a> database (<span class='public-file-name'>data / symbol-properties / symbol-properties-database.csv</span>).
To disable the updates, open the <a href='https://www.quantconnect.com/docs/v2/lean-cli/initialization/configuration#03-Lean-Configuration'>LEAN configuration file</a> (<span class='public-file-name'>lean.json</span>) and set the <code>file-database-last-update</code> value to a date in the future.
</p>
2 changes: 1 addition & 1 deletion 07 Meta/01 Change Log/02 Documentation Updates.html
Original file line number Diff line number Diff line change
Expand Up @@ -2405,7 +2405,7 @@ <h4>2022-11-22</h4>
<li><a href="/docs/v2/lean-cli/api-reference/lean-project-delete#02-Description">LEAN CLI &gt; API Reference &gt; lean project-delete &gt; Description</a></li>
</ul>
<li>Updated <a href="/docs/v2/writing-algorithms/trading-and-orders/key-concepts#06-Live-Trading-Considerations">Writing Algorithms &gt; Trading and Orders &gt; Live Trading Considerations</a> and <a href="/docs/v2/writing-algorithms/live-trading/trading-and-orders#01-Introduction">Writing Algorithms &gt; Live Trading &gt; Trading and Orders &gt; Introduction</a> to explain that the fill models check if orders should fill as frequently as the resolution of the security subscription allows.</li>
<li>Updated <a href="/docs/v2/writing-algorithms/securities/key-concepts#07-Tradable-Status">Writing Algorithms &gt; Securities &gt; Key Concepts &gt; Tradable Status</a> and <a href="/docs/v2/writing-algorithms/trading-and-orders/order-errors#18-Common-Errors">Writing Algorithms &gt; Trading and Orders &gt; Order Errors &gt; Common Errors</a> to explain that continuous Futures contracts aren't tradable.</li>
<li>Updated <a href="/docs/v2/writing-algorithms/securities/key-concepts#05-Tradable-Status">Writing Algorithms &gt; Securities &gt; Key Concepts &gt; Tradable Status</a> and <a href="/docs/v2/writing-algorithms/trading-and-orders/order-errors#18-Common-Errors">Writing Algorithms &gt; Trading and Orders &gt; Order Errors &gt; Common Errors</a> to explain that continuous Futures contracts aren't tradable.</li>
<li>Updated <a href="/docs/v2/writing-algorithms/trading-and-orders/order-types/option-exercise-orders#02-Place-Orders">Writing Algorithms &gt; Trading and Orders &gt; Order Types &gt; Option Exercise Orders &gt; Place Orders</a> to mention that you can (depending on your brokerage) exercise European-style Options on their expiration date in response to <a rel="nofollow" target="_blank" href="https://github.com/QuantConnect/Lean/pull/6734/">LEAN PR #6734</a>.</li>
</ul>

Expand Down
2 changes: 1 addition & 1 deletion Resources/securities/corporate-actions/splits.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<p>You receive <code>Split</code> objects when a split is in the near future and when it occurs. To know if the split occurs in the near future or now, check the <code class="csharp">Type</code><code class="python">type</code> property.</p>

<p>If you backtest without the <code class="csharp">Raw</code><code class="python">RAW</code> <a href='<?=$dataNormalizationModeLink?>'>data normalization mode</a>, the splits are factored into the price and volume. If you backtest with the <code class="csharp">Raw</code><code class="python">RAW</code> data normalization mode or trade live, when a split occurs, LEAN automatically adjusts your positions based on the <code class="csharp">SplitFactor</code><code class="python">split_factor</code>. If the post-split quantity isn't a valid <a href='/docs/v2/writing-algorithms/securities/properties#50-Symbol-Properties'>lot size</a>, LEAN credits the remaining value to your <a href='/docs/v2/writing-algorithms/portfolio/cashbook'>cashbook</a> in your account currency. If you have indicators in your algorithm, <a href='/docs/v2/writing-algorithms/indicators/key-concepts#11-Reset-Indicators'>reset and warm-up your indicators with ScaledRaw data</a> when splits occur so that the data in your indicators account for the price adjustments that the splits cause.</p>
<p>If you backtest without the <code class="csharp">Raw</code><code class="python">RAW</code> <a href='<?=$dataNormalizationModeLink?>'>data normalization mode</a>, the splits are factored into the price and volume. If you backtest with the <code class="csharp">Raw</code><code class="python">RAW</code> data normalization mode or trade live, when a split occurs, LEAN automatically adjusts your positions based on the <code class="csharp">SplitFactor</code><code class="python">split_factor</code>. If the post-split quantity isn't a valid <a href='/docs/v2/writing-algorithms/securities/key-concepts#06-Symbol-Properties'>lot size</a>, LEAN credits the remaining value to your <a href='/docs/v2/writing-algorithms/portfolio/cashbook'>cashbook</a> in your account currency. If you have indicators in your algorithm, <a href='/docs/v2/writing-algorithms/indicators/key-concepts#11-Reset-Indicators'>reset and warm-up your indicators with ScaledRaw data</a> when splits occur so that the data in your indicators account for the price adjustments that the splits cause.</p>

<p>To get the <code>Split</code> objects, index the <code class="csharp">Splits</code><code class="python">splits</code> object with the security <code class="csharp">Symbol</code><code class="python">symbol</code>. The <code class="csharp">Splits</code><code class="python">splits</code> object may not contain data for your <code>Symbol</code>. To avoid issues, check if the <code class="csharp">Splits</code><code class="python">splits</code> object contains data for your security before you index it with the security <code>Symbol</code>.</p>

Expand Down
4 changes: 2 additions & 2 deletions Resources/universes/option/option-filter-universe.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@
</tr>
<tr>
<td><code class="csharp">BoxSpread(int minDaysTillExpiry, decimal strikeSpread)</code><code class="python">box_spread(min_days_till_expiry: int, strike_spread: float)</code></td>
<td>Selects four contracts to form <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/box-spread">Box Spread</a> or <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/short-box-spread">Short Box Spread</a> Option strategies.</td></td>
<td>Selects four contracts to form <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/long-box-spread">Box Spread</a> or <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/short-box-spread">Short Box Spread</a> Option strategies.</td></td>
</tr>
<tr>
<td><code class="csharp">JellyRoll(decimal strikeFromAtm, int minNearDaysTillExpiry, int minFarDaysTillExpiry)</code><code class="python">jelly_roll(strike_from_atm: float, min_near_days_till_expiry: int, min_far_days_till_expiry: int)</code></td>
<td>Selects four contracts to form <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/jelly-roll">Jelly Roll</a> or <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/short-jelly-roll">Short Jelly Roll</a> Option strategies.</td></td>
<td>Selects four contracts to form <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/long-jelly-roll">Jelly Roll</a> or <a href="/docs/v2/writing-algorithms/trading-and-orders/option-strategies/short-jelly-roll">Short Jelly Roll</a> Option strategies.</td></td>
</tr>
<tr>
<td><code class="csharp">CallLadder(int minDaysTillExpiry, decimal higherStrikeFromAtm, decimal middleStrikeFromAtm, decimal lowerStrikeFromAtm)</code><code class="python">call_ladder(min_days_till_expiry: int, higher_strike_from_atm: float, middle_strike_from_atm: float, lower_strike_from_atm: float)</code></td>
Expand Down
Loading

0 comments on commit 7244d47

Please sign in to comment.