Skip to content

Commit

Permalink
Adds Reference to TradingDaysPerYear Setting
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexCatarino committed May 9, 2024
1 parent 60a2880 commit 967f671
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ <h4>Property: <span><code class="csharp">StalePriceTimeSpan</code><code class="p
<p>Data Type: <span class="csharp"><code>TimeSpan</code></span><span class="python"><code>timedelta</code></span><span class="pipe-separator"> | </span> Default Value: <span><code class='csharp'>TimeSpan.FromHours(1)</code><code class='python'>timedelta(hours=1)</code></span></p>
</td>
</tr>
<tr>
<td>
<h4>Property: <span><code class="csharp">TradingDaysPerYear</code><code class="python">trading_days_per_year</code></span></h4>
<p class="property-description">Number of trading days per year for this Algorithm's portfolio statistics.</p>
<p>Data Type: <span class="csharp"><code>integer</code></span><span class="python"><code>int</code></span><span class="pipe-separator"> | </span> Default Value: <span><code>252</code></span></p>
</td>
</tr>
<tr>
<td>
<h4>Property: <span><code class="csharp">WarmUpResolution</code><code class="python">warm_up_resolution</code></span></h4>
Expand All @@ -78,8 +85,10 @@ <h4>Property: <span><code class="csharp">WarmUpResolution</code><code class="pyt
<p>To change the <code class="csharp">Settings</code><code class="python">settings</code>, update some of the preceding properties.</p>

<div class="section-example-container">
<pre class="csharp">Settings.RebalancePortfolioOnSecurityChanges = false;</pre>
<pre class="python">self.settings.rebalance_portfolio_on_security_changes = False</pre>
<pre class="csharp">Settings.RebalancePortfolioOnSecurityChanges = false;
Settings.TradingDaysPerYear = 365;</pre>
<pre class="python">self.settings.rebalance_portfolio_on_security_changes = False
self.settings.trading_days_per_year = 365</pre>
</div>

<p>To successfully update the <code class="csharp">FreePortfolioValue</code><code class="python">free_portfolio_value</code>, you must update it after the <code class="csharp">Initialize</code><code class="python">initialize</code> method.</p>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p>The <code>StatisticsResults</code> object tracks all the statistics of your algorithm. You can access the statistics anywhere in your algorithm where you have a reference to the algorithm class. Some of these statistics are a function of the <a href='/docs/v2/writing-algorithms/reality-modeling/risk-free-interest-rate/key-concepts'>risk free interest rate</a>.</p>
<p>The <code>StatisticsResults</code> object tracks all the statistics of your algorithm. You can access the statistics anywhere in your algorithm where you have a reference to the algorithm class. Some of these statistics are a function of the <a href='/docs/v2/writing-algorithms/reality-modeling/risk-free-interest-rate/key-concepts'>risk free interest rate</a> and the <a href='/docs/v2/writing-algorithms/initialization#10-Set-Algorithm-Settings'>number of trading days per year</a>.</p>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p>Runtime statistics show the performace of your algorithm at a single moment in time. Some of these statistics are a function of the <a href='/docs/v2/writing-algorithms/reality-modeling/risk-free-interest-rate/key-concepts'>risk free interest rate</a>.</p>
<p>Runtime statistics show the performace of your algorithm at a single moment in time. Some of these statistics are a function of the <a href='/docs/v2/writing-algorithms/reality-modeling/risk-free-interest-rate/key-concepts'>risk free interest rate</a> and the <a href='/docs/v2/writing-algorithms/initialization#10-Set-Algorithm-Settings'>number of trading days per year</a>.</p>

0 comments on commit 967f671

Please sign in to comment.