Skip to content

Commit 3dead05

Browse files
committed
Adds Missing Date Range
1 parent a8107a8 commit 3dead05

File tree

26 files changed

+99
-7
lines changed

26 files changed

+99
-7
lines changed

03 Writing Algorithms/03 Securities/99 Asset Classes/03 Crypto/01 Requesting Data/99 Examples.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ <h4>
2323
{
2424
public override void Initialize()
2525
{
26+
SetStartDate(2024, 9, 1);
27+
SetEndDate(2024, 12, 31);
2628
// Set the brokerage and account type for accurate fee and margin behavior.
2729
SetBrokerageModel(BrokerageName.Binance, AccountType.Cash);
2830

@@ -69,6 +71,8 @@ <h4>
6971
</script>
7072
<pre class="python">class CryptoExampleAlgorithm(QCAlgorithm):
7173
def initialize(self) -&gt; None:
74+
self.set_start_date(2024, 9, 1)
75+
self.set_end_date(2024, 12, 31)
7276
# Set the brokerage and account type for accurate fee and margin behavior.
7377
self.set_brokerage_model(BrokerageName.BINANCE, AccountType.CASH)
7478

03 Writing Algorithms/03 Securities/99 Asset Classes/03 Crypto/02 Handling Data/99 Examples.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ <h4>
1919

2020
public override void Initialize()
2121
{
22+
SetStartDate(2024, 9, 1);
23+
SetEndDate(2024, 12, 31);
2224
// Set the brokerage and account type to match your brokerage environment for accurate fee and margin behavior.
2325
SetBrokerageModel(BrokerageName.Bitfinex, AccountType.Cash);
2426
// For daily DCA purchases, subscribe to daily asset data.
@@ -76,6 +78,8 @@ <h4>
7678
<pre class="python">class CryptoExampleAlgorithm(QCAlgorithm):
7779

7880
def initialize(self) -&gt; None:
81+
self.set_start_date(2024, 9, 1)
82+
self.set_end_date(2024, 12, 31)
7983
# Set a day count variable for counting the days of the DCA trade.
8084
self._day_count = 0
8185
# Set the brokerage and account type to match your brokerage environment for accurate fee and margin behavior.
@@ -143,6 +147,8 @@ <h4>
143147

144148
public override void Initialize()
145149
{
150+
SetStartDate(2024, 9, 1);
151+
SetEndDate(2024, 12, 31);
146152
// Subscribe to BTC/USD on 2 different exchanges.
147153
_krakenBtc = AddCrypto("BTCUSD", market: Market.Kraken).Symbol;
148154
_coinbaseBtc = AddCrypto("BTCUSD", market: Market.Coinbase).Symbol;
@@ -191,6 +197,8 @@ <h4>
191197
</script>
192198
<pre class="python">class CryptoExampleAlgorithm(QCAlgorithm):
193199
def initialize(self) -&gt; None:
200+
self.set_start_date(2024, 9, 1)
201+
self.set_end_date(2024, 12, 31)
194202
# Subscribe to BTC/USD on 2 different exchanges.
195203
self.kraken_btc = self.add_crypto("BTCUSD", market=Market.KRAKEN).symbol
196204
self.coinbase_btc = self.add_crypto("BTCUSD", market=Market.COINBASE).symbol

03 Writing Algorithms/03 Securities/99 Asset Classes/04 Crypto Futures/01 Requesting Data/99 Examples.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ <h4>
1616
public override void Initialize()
1717
{
1818
SetStartDate(2020, 4, 1);
19+
SetEndDate(2024, 12, 31);
1920
// Set brokerage and account type to match your brokerage environment for accurate fee and margin behavior.
2021
SetBrokerageModel(BrokerageName.Binance, AccountType.Margin);
2122
// In the Binance brokerage, you can't trade with USD.
@@ -75,6 +76,7 @@ <h4>
7576

7677
def initialize(self) -&gt; None:
7778
self.set_start_date(2020, 4, 1)
79+
self.set_end_date(2024, 12, 31)
7880
# Set brokerage and account type to match your brokerage environment for accurate fee and margin behavior.
7981
self.set_brokerage_model(BrokerageName.BINANCE, AccountType.MARGIN)
8082
# In the Binance brokerage, you can't trade with USD.

03 Writing Algorithms/12 Universes/03 Equity/01 Liquidity Universes/99 Examples.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ <h4>
2121
{
2222
public override void Initialize()
2323
{
24+
SetStartDate(2024, 1, 1);
25+
SetEndDate(2024, 7, 1);
2426
// Use asynchronous universe selection to speed up your algorithm.
2527
UniverseSettings.Asynchronous = true;
2628
// Use minute resolution data so orders fill at realistic prices.
@@ -62,7 +64,9 @@ <h4>
6264
</script>
6365
<pre class="python">class MinuteLiquidUniverseAlgorithm(QCAlgorithm):
6466

65-
def initialize(self) -&gt; None:
67+
def initialize(self) -> None:
68+
self.set_start_date(2024, 1, 1)
69+
self.set_end_date(2024, 7, 1)
6670
# Use asynchronous universe selection to speed up your algorithm.
6771
self.universe_settings.asynchronous = True
6872
# Use minute resolution data so orders fill at realistic prices.

03 Writing Algorithms/12 Universes/03 Equity/03 ETF Constituents Universes/99 Examples.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ <h4>
1818
public override void Initialize()
1919
{
2020
SetStartDate(2023, 6, 1);
21+
SetEndDate(2024, 12, 31);
2122
SetCash(10000000);
2223
Settings.MinimumOrderMarginPortfolioPercentage = 0m;
2324
// To avoid over-trading and high transaction costs, refilter and rebalance weekly.
@@ -98,6 +99,7 @@ <h4>
9899

99100
def initialize(self) -&gt; None:
100101
self.set_start_date(2023, 6, 1)
102+
self.set_end_date(2024, 12, 31)
101103
self.set_cash(10_000_000)
102104
self.settings.minimum_order_margin_portfolio_percentage = 0
103105
# To avoid over-trading and high transaction costs, refilter and rebalance weekly.
@@ -195,6 +197,7 @@ <h4>
195197
public override void Initialize()
196198
{
197199
SetStartDate(2023, 6, 1);
200+
SetEndDate(2024, 12, 31);
198201
// Seed the price of each asset that enters the universe with its last known price so you can trade it
199202
// on the same morning it enters the universe without getting warnings.
200203
SetSecurityInitializer(
@@ -309,6 +312,7 @@ <h4>
309312

310313
def initialize(self):
311314
self.set_start_date(2023, 6, 1)
315+
self.set_end_date(2024, 12, 31)
312316
# Seed the price of each asset that enters the universe with its last known price so you can trade it
313317
# on the same morning it enters the universe without getting warnings.
314318
self.set_security_initializer(

03 Writing Algorithms/12 Universes/03 Equity/04 Chained Universes/05 Chain Fundamental and Alternative Data.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
public override void Initialize()
1818
{
1919
SetStartDate(2023, 1, 2);
20+
SetEndDate(2024, 12, 31);
2021
SetCash(100000);
2122

2223
// Filter the top 100 liquid equities of the last trading day, and save the symbols for the next filtering.
@@ -93,6 +94,7 @@
9394

9495
def initialize(self) -&gt; None:
9596
self.set_start_date(2023, 1, 2)
97+
self.set_end_date(2024, 12, 31)
9698
self.set_cash(100000)
9799
self.add_universe(self._fundamental_filter_function)
98100
self.add_universe(QuiverCNBCsUniverse, self._mad_money_selection)

03 Writing Algorithms/12 Universes/03 Equity/04 Chained Universes/06 Chain Fundamental and US Equity Options.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
public override void Initialize()
1818
{
1919
SetStartDate(2023, 2, 2);
20+
SetEndDate(2024, 12, 31);
2021
SetCash(100000);
2122
UniverseSettings.Asynchronous = true;
2223
// Need to set data normalization mode to raw for options to compare the strike price fairly.
@@ -92,6 +93,8 @@
9293
class ChainedUniverseAlgorithm(QCAlgorithm):
9394
def initialize(self) -&gt; None:
9495
self.set_start_date(2023, 2, 2)
96+
self.set_end_date(2024, 12, 31)
97+
self.set_cash(100000)
9598
self.universe_settings.asynchronous = True
9699
# Need to set data normalization mode to raw for options to compare the strike price fairly.
97100
self.universe_settings.data_normalization_mode = DataNormalizationMode.RAW

03 Writing Algorithms/12 Universes/03 Equity/04 Chained Universes/07 Chain ETF and Fundamental.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
public override void Initialize()
2121
{
2222
SetStartDate(2023, 2, 2);
23+
SetEndDate(2024, 12, 31);
2324
SetCash(100000);
2425
UniverseSettings.Asynchronous = true;
2526
// Select QQQ constituents first, then by fundamental data.
@@ -55,6 +56,7 @@
5556
class ChainedUniverseAlgorithm(QCAlgorithm):
5657
def initialize(self) -&gt; None:
5758
self.set_start_date(2023, 2, 2)
59+
self.set_end_date(2024, 12, 31)
5860
self.set_cash(100000)
5961
self.universe_settings.asynchronous = True
6062
# Select QQQ constituents first, then by fundamental data.

03 Writing Algorithms/12 Universes/03 Equity/04 Chained Universes/08 Chain ETF and Alternative Data.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
public override void Initialize()
1818
{
1919
SetStartDate(2023, 1, 2);
20+
SetEndDate(2024, 12, 31);
2021
SetCash(100000);
2122
UniverseSettings.Asynchronous = true;
2223

@@ -92,6 +93,7 @@
9293

9394
def initialize(self):
9495
self.set_start_date(2023, 1, 2)
96+
self.set_end_date(2024, 12, 31)
9597
self.set_cash(100000)
9698
self.universe_settings.asynchronous = True
9799
# Save all SPY constituents for the next filtering.

03 Writing Algorithms/12 Universes/03 Equity/04 Chained Universes/10 Chain ETF and US Equity Options.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
public override void Initialize()
1818
{
1919
SetStartDate(2023, 2, 2);
20+
SetEndDate(2024, 12, 31);
2021
SetCash(100000);
2122
UniverseSettings.Asynchronous = true;
2223
// Need to set the data normalization mode to raw for fair strike price comparison.
@@ -88,6 +89,8 @@
8889
class ChainedUniverseAlgorithm(QCAlgorithm):
8990
def initialize(self):
9091
self.set_start_date(2023, 2, 2)
92+
self.set_end_date(2024, 12, 31)
93+
self.set_cash(100000)
9194
self.universe_settings.asynchronous = True
9295
# Set the data normalization mode to raw for fair strike price comparison.
9396
self.universe_settings.data_normalization_mode = DataNormalizationMode.RAW

0 commit comments

Comments
 (0)