hyperdrive 1.15.2__tar.gz → 2.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. hyperdrive-2.1.0/.github/dependabot.yml +17 -0
  2. hyperdrive-2.1.0/.github/workflows/api.yml +47 -0
  3. hyperdrive-2.1.0/.github/workflows/dividends.yml +43 -0
  4. hyperdrive-2.1.0/.github/workflows/indicators.yml +49 -0
  5. hyperdrive-2.1.0/.github/workflows/indices.yml +42 -0
  6. hyperdrive-2.1.0/.github/workflows/integration.yml +54 -0
  7. hyperdrive-2.1.0/.github/workflows/intraday.yml +43 -0
  8. hyperdrive-2.1.0/.github/workflows/keepalive.yml +35 -0
  9. hyperdrive-2.1.0/.github/workflows/model.yml +63 -0
  10. hyperdrive-2.1.0/.github/workflows/ohlc.yml +46 -0
  11. hyperdrive-2.1.0/.github/workflows/optimize.yml +49 -0
  12. hyperdrive-2.1.0/.github/workflows/pr.yml +534 -0
  13. hyperdrive-2.1.0/.github/workflows/predict.yml +71 -0
  14. hyperdrive-2.1.0/.github/workflows/release.yml +174 -0
  15. hyperdrive-2.1.0/.github/workflows/splits.yml +43 -0
  16. hyperdrive-2.1.0/.github/workflows/spreadsheet.yml +51 -0
  17. hyperdrive-2.1.0/.github/workflows/test.yml +41 -0
  18. hyperdrive-2.1.0/.github/workflows/unrate.yml +43 -0
  19. hyperdrive-2.1.0/.github/workflows/visualize.yml +41 -0
  20. hyperdrive-2.1.0/.gitignore +161 -0
  21. hyperdrive-2.1.0/.python-version +1 -0
  22. hyperdrive-2.1.0/AGENTS.md +196 -0
  23. hyperdrive-2.1.0/CLAUDE.md +1 -0
  24. hyperdrive-2.1.0/Makefile +61 -0
  25. hyperdrive-2.1.0/PKG-INFO +405 -0
  26. hyperdrive-2.1.0/README.md +369 -0
  27. hyperdrive-2.1.0/assets/qr_bnb.png +0 -0
  28. hyperdrive-2.1.0/assets/qr_btc.png +0 -0
  29. hyperdrive-2.1.0/assets/qr_eth.png +0 -0
  30. hyperdrive-2.1.0/assets/qr_xmr.png +0 -0
  31. hyperdrive-2.1.0/docs/internal/stocktwits.md +4 -0
  32. hyperdrive-2.1.0/docs/internal/testing.md +5 -0
  33. hyperdrive-2.1.0/encrypted/create_model.py.encrypted +0 -0
  34. hyperdrive-2.1.0/encrypted/generate_preview.py.encrypted +0 -0
  35. hyperdrive-2.1.0/encrypted/optimize_portfolio.py.encrypted +0 -0
  36. hyperdrive-2.1.0/encrypted/predict_signal.py.encrypted +0 -0
  37. hyperdrive-2.1.0/hyperdrive/Algotrader.py +22 -0
  38. hyperdrive-2.1.0/hyperdrive/Broker.py +175 -0
  39. hyperdrive-2.1.0/hyperdrive/Calculus.py +385 -0
  40. hyperdrive-2.1.0/hyperdrive/Constants.py +407 -0
  41. hyperdrive-2.1.0/hyperdrive/Crypt.py +97 -0
  42. hyperdrive-2.1.0/hyperdrive/DataSource.py +1555 -0
  43. hyperdrive-2.1.0/hyperdrive/Exchange.py +750 -0
  44. hyperdrive-2.1.0/hyperdrive/FileOps.py +332 -0
  45. hyperdrive-2.1.0/hyperdrive/History.py +536 -0
  46. hyperdrive-2.1.0/hyperdrive/Precognition.py +163 -0
  47. hyperdrive-2.1.0/hyperdrive/Staking.py +930 -0
  48. hyperdrive-2.1.0/hyperdrive/Storage.py +251 -0
  49. {hyperdrive-1.15.2 → hyperdrive-2.1.0}/hyperdrive/TimeMachine.py +55 -51
  50. hyperdrive-2.1.0/hyperdrive/Transformer.py +43 -0
  51. hyperdrive-2.1.0/hyperdrive/Utils.py +71 -0
  52. hyperdrive-2.1.0/hyperdrive/Workflow.py +88 -0
  53. hyperdrive-2.1.0/hyperdrive/__init__.py +6 -0
  54. hyperdrive-2.1.0/hyperdrive/_version.py +24 -0
  55. hyperdrive-2.1.0/pyproject.toml +129 -0
  56. hyperdrive-2.1.0/scripts/check_dist.py +38 -0
  57. hyperdrive-2.1.0/scripts/delete_data_dir.py +29 -0
  58. hyperdrive-2.1.0/scripts/delete_dir.py +35 -0
  59. hyperdrive-2.1.0/scripts/dune_validator_rewards.sql +163 -0
  60. hyperdrive-2.1.0/scripts/execute_order.py +59 -0
  61. hyperdrive-2.1.0/scripts/login.py +3 -0
  62. hyperdrive-2.1.0/scripts/qr.py +109 -0
  63. hyperdrive-2.1.0/scripts/sleep.py +8 -0
  64. hyperdrive-2.1.0/scripts/update_api.py +170 -0
  65. hyperdrive-2.1.0/scripts/update_dividends.py +52 -0
  66. hyperdrive-2.1.0/scripts/update_hist_dividends.py +40 -0
  67. hyperdrive-2.1.0/scripts/update_hist_intraday.py +39 -0
  68. hyperdrive-2.1.0/scripts/update_hist_ohlc.py +45 -0
  69. hyperdrive-2.1.0/scripts/update_hist_splits.py +40 -0
  70. hyperdrive-2.1.0/scripts/update_indicators.py +44 -0
  71. hyperdrive-2.1.0/scripts/update_indices.py +5 -0
  72. hyperdrive-2.1.0/scripts/update_intraday.py +47 -0
  73. hyperdrive-2.1.0/scripts/update_ndx_api.py +12 -0
  74. hyperdrive-2.1.0/scripts/update_ohlc.py +193 -0
  75. hyperdrive-2.1.0/scripts/update_repo.py +26 -0
  76. hyperdrive-2.1.0/scripts/update_splits.py +49 -0
  77. hyperdrive-2.1.0/scripts/update_spreadsheet.py +198 -0
  78. hyperdrive-2.1.0/scripts/update_symbols.py +4 -0
  79. hyperdrive-2.1.0/scripts/update_unrate.py +4 -0
  80. hyperdrive-2.1.0/scripts/upload_data.py +20 -0
  81. hyperdrive-2.1.0/scripts/visualize.py +61 -0
  82. hyperdrive-2.1.0/tests/integration/test_broker_live.py +29 -0
  83. hyperdrive-2.1.0/tests/integration/test_datasource_live.py +80 -0
  84. hyperdrive-2.1.0/tests/integration/test_exchange_live.py +53 -0
  85. hyperdrive-2.1.0/tests/integration/test_storage_live.py +38 -0
  86. hyperdrive-2.1.0/tests/smoke.py +100 -0
  87. hyperdrive-2.1.0/tests/unit/conftest.py +401 -0
  88. hyperdrive-2.1.0/tests/unit/test_Algotrader.py +16 -0
  89. hyperdrive-2.1.0/tests/unit/test_Broker.py +337 -0
  90. hyperdrive-2.1.0/tests/unit/test_Calculus.py +182 -0
  91. hyperdrive-2.1.0/tests/unit/test_Constants.py +127 -0
  92. hyperdrive-2.1.0/tests/unit/test_Crypt.py +65 -0
  93. hyperdrive-2.1.0/tests/unit/test_DataSource.py +1634 -0
  94. hyperdrive-2.1.0/tests/unit/test_Exchange.py +842 -0
  95. hyperdrive-2.1.0/tests/unit/test_FileOps.py +743 -0
  96. hyperdrive-2.1.0/tests/unit/test_History.py +155 -0
  97. hyperdrive-2.1.0/tests/unit/test_Precognition.py +160 -0
  98. hyperdrive-2.1.0/tests/unit/test_Scripts.py +301 -0
  99. hyperdrive-2.1.0/tests/unit/test_Staking.py +837 -0
  100. hyperdrive-2.1.0/tests/unit/test_Storage.py +328 -0
  101. hyperdrive-2.1.0/tests/unit/test_TimeMachine.py +135 -0
  102. {hyperdrive-1.15.2/test → hyperdrive-2.1.0/tests/unit}/test_Transformer.py +17 -14
  103. hyperdrive-2.1.0/tests/unit/test_Utils.py +43 -0
  104. hyperdrive-2.1.0/tests/unit/test_Workflow.py +106 -0
  105. hyperdrive-2.1.0/util/decrypt.py +19 -0
  106. hyperdrive-2.1.0/util/encrypt.py +19 -0
  107. hyperdrive-2.1.0/util/get_loc.sh +5 -0
  108. hyperdrive-2.1.0/util/git_cleanup.sh +1 -0
  109. hyperdrive-2.1.0/util/install_ta_lib.sh +7 -0
  110. hyperdrive-2.1.0/util/keepalive.py +19 -0
  111. hyperdrive-2.1.0/util/process.py +31 -0
  112. hyperdrive-2.1.0/util/pypi.py +19 -0
  113. hyperdrive-2.1.0/util/pypi_cleanup.sh +3 -0
  114. hyperdrive-2.1.0/util/sync.sh +33 -0
  115. hyperdrive-2.1.0/util/update.py +45 -0
  116. hyperdrive-2.1.0/uv.lock +4834 -0
  117. hyperdrive-1.15.2/PKG-INFO +0 -300
  118. hyperdrive-1.15.2/README.md +0 -287
  119. hyperdrive-1.15.2/hyperdrive/Algotrader.py +0 -15
  120. hyperdrive-1.15.2/hyperdrive/Broker.py +0 -79
  121. hyperdrive-1.15.2/hyperdrive/Calculus.py +0 -190
  122. hyperdrive-1.15.2/hyperdrive/Constants.py +0 -276
  123. hyperdrive-1.15.2/hyperdrive/Crypt.py +0 -22
  124. hyperdrive-1.15.2/hyperdrive/DataSource.py +0 -922
  125. hyperdrive-1.15.2/hyperdrive/Exchange.py +0 -419
  126. hyperdrive-1.15.2/hyperdrive/FileOps.py +0 -144
  127. hyperdrive-1.15.2/hyperdrive/History.py +0 -300
  128. hyperdrive-1.15.2/hyperdrive/Precognition.py +0 -79
  129. hyperdrive-1.15.2/hyperdrive/Storage.py +0 -105
  130. hyperdrive-1.15.2/hyperdrive/Transformer.py +0 -30
  131. hyperdrive-1.15.2/hyperdrive/Utils.py +0 -31
  132. hyperdrive-1.15.2/hyperdrive/Workflow.py +0 -49
  133. hyperdrive-1.15.2/hyperdrive/__init__.py +0 -5
  134. hyperdrive-1.15.2/hyperdrive.egg-info/PKG-INFO +0 -300
  135. hyperdrive-1.15.2/hyperdrive.egg-info/SOURCES.txt +0 -38
  136. hyperdrive-1.15.2/hyperdrive.egg-info/dependency_links.txt +0 -1
  137. hyperdrive-1.15.2/hyperdrive.egg-info/requires.txt +0 -19
  138. hyperdrive-1.15.2/hyperdrive.egg-info/top_level.txt +0 -1
  139. hyperdrive-1.15.2/setup.cfg +0 -4
  140. hyperdrive-1.15.2/setup.py +0 -49
  141. hyperdrive-1.15.2/test/test_Algotrader.py +0 -15
  142. hyperdrive-1.15.2/test/test_Broker.py +0 -67
  143. hyperdrive-1.15.2/test/test_Calculus.py +0 -120
  144. hyperdrive-1.15.2/test/test_Constants.py +0 -53
  145. hyperdrive-1.15.2/test/test_DataSource.py +0 -393
  146. hyperdrive-1.15.2/test/test_Exchange.py +0 -307
  147. hyperdrive-1.15.2/test/test_FileOps.py +0 -156
  148. hyperdrive-1.15.2/test/test_History.py +0 -94
  149. hyperdrive-1.15.2/test/test_Precognition.py +0 -71
  150. hyperdrive-1.15.2/test/test_Storage.py +0 -85
  151. hyperdrive-1.15.2/test/test_TimeMachine.py +0 -66
  152. hyperdrive-1.15.2/test/test_Utils.py +0 -34
  153. hyperdrive-1.15.2/test/test_Workflow.py +0 -19
  154. {hyperdrive-1.15.2 → hyperdrive-2.1.0}/LICENSE +0 -0
@@ -0,0 +1,17 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "uv"
9
+ directory: "/" # Location of pyproject.toml and uv.lock
10
+ schedule:
11
+ interval: "monthly"
12
+
13
+ - package-ecosystem: "github-actions"
14
+ directory: "/"
15
+ schedule:
16
+ # Check for updates to GitHub Actions monthly
17
+ interval: "monthly"
@@ -0,0 +1,47 @@
1
+ # This workflow will automatically update data files
2
+ # For more information see: https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule
3
+
4
+ name: API
5
+
6
+ on:
7
+ schedule:
8
+ - cron: "30 19 * * *"
9
+ # 2:30pm EST every day (for crypto)
10
+ # choose a time after OHLC update
11
+ workflow_dispatch:
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ build:
18
+ runs-on: ubuntu-latest
19
+
20
+ steps:
21
+ - name: Checkout repo
22
+ uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
23
+
24
+ - name: Set up Python
25
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
26
+ with:
27
+ python-version: '3.11'
28
+
29
+ - name: Install uv
30
+ uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
31
+ with:
32
+ enable-cache: true
33
+
34
+ - name: Install dependencies
35
+ run: make ci
36
+
37
+ - name: Update API
38
+ env:
39
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
40
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
41
+ AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
42
+ S3_BUCKET: ${{ secrets.S3_BUCKET }}
43
+ SYMBOL: ${{ secrets.SYMBOL }}
44
+ KRAKEN_KEY: ${{ secrets.KRAKEN_KEY }}
45
+ KRAKEN_SECRET: ${{ secrets.KRAKEN_SECRET }}
46
+ PREF_EXCHANGE: ${{ secrets.PREF_EXCHANGE }}
47
+ run: uv run --frozen --no-dev python scripts/update_api.py
@@ -0,0 +1,43 @@
1
+ # This workflow will automatically update data files
2
+ # For more information see: https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule
3
+
4
+ name: Dividends
5
+
6
+ on:
7
+ schedule:
8
+ - cron: "0 12 1 * *"
9
+ # 8am EST
10
+ workflow_dispatch:
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ jobs:
16
+ build:
17
+ runs-on: ubuntu-latest
18
+
19
+ steps:
20
+ - name: Checkout repo
21
+ uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
25
+ with:
26
+ python-version: '3.11'
27
+
28
+ - name: Install uv
29
+ uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
30
+ with:
31
+ enable-cache: true
32
+
33
+ - name: Install dependencies
34
+ run: make ci
35
+
36
+ - name: Update dividends
37
+ env:
38
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
39
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
40
+ AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
41
+ S3_BUCKET: ${{ secrets.S3_BUCKET }}
42
+ POLYGON: ${{ secrets.POLYGON }}
43
+ run: uv run --frozen --no-dev python scripts/update_dividends.py
@@ -0,0 +1,49 @@
1
+ # This workflow will automatically update data files
2
+ # For more information see: https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule
3
+
4
+ name: Indicators
5
+
6
+ on:
7
+ schedule:
8
+ - cron: "0 9 * * *"
9
+ # 5am EST
10
+ workflow_dispatch:
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ jobs:
16
+ build:
17
+ runs-on: ubuntu-latest
18
+
19
+ steps:
20
+ - name: Checkout repo
21
+ uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
25
+ with:
26
+ python-version: '3.11'
27
+
28
+ - name: Install uv
29
+ uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
30
+ with:
31
+ enable-cache: true
32
+
33
+ - name: Install dependencies
34
+ run: make ci
35
+
36
+ - uses: browser-actions/setup-chrome@c785b87e244131f27c9f19c1a33e2ead956ab7ce # v1.7.3
37
+ with:
38
+ chrome-version: stable
39
+
40
+ - name: Update indicators
41
+ env:
42
+ GLASSNODE: ${{ secrets.GLASSNODE }}
43
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
44
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
45
+ AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
46
+ S3_BUCKET: ${{ secrets.S3_BUCKET }}
47
+ RH_USERNAME: ${{ secrets.RH_USERNAME }}
48
+ GLASSNODE_PASS: ${{ secrets.GLASSNODE_PASS }}
49
+ run: uv run --frozen --no-dev python scripts/update_indicators.py
@@ -0,0 +1,42 @@
1
+ # This workflow will automatically update data files
2
+ # For more information see: https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule
3
+
4
+ name: Indices
5
+
6
+ on:
7
+ schedule:
8
+ - cron: "00 22 * * *"
9
+ # 5:00pm EST
10
+ workflow_dispatch:
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ jobs:
16
+ build:
17
+ runs-on: ubuntu-latest
18
+
19
+ steps:
20
+ - name: Checkout repo
21
+ uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
25
+ with:
26
+ python-version: '3.11'
27
+
28
+ - name: Install uv
29
+ uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
30
+ with:
31
+ enable-cache: true
32
+
33
+ - name: Install dependencies
34
+ run: make ci
35
+
36
+ - name: Update indices
37
+ env:
38
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
39
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
40
+ AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
41
+ S3_BUCKET: ${{ secrets.S3_BUCKET }}
42
+ run: uv run --frozen --no-dev python scripts/update_indices.py
@@ -0,0 +1,54 @@
1
+ name: Integration
2
+
3
+ # Runs the live API tests (pytest -m integration), which every other workflow
4
+ # deselects. Started by hand only; each test reads its provider's secret below.
5
+ on:
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ integration:
13
+ name: Integration Tests
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
17
+ with:
18
+ persist-credentials: false
19
+
20
+ - name: Set up Python
21
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
22
+ with:
23
+ python-version: '3.11'
24
+
25
+ - name: Install uv
26
+ uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
27
+
28
+ - name: Install dependencies
29
+ run: make ci DEV=1
30
+
31
+ - name: Run integration tests
32
+ env:
33
+ # Store
34
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
35
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
36
+ AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
37
+ S3_BUCKET: ${{ secrets.S3_DEV_BUCKET }}
38
+ # Polygon, AlpacaData, LaborStats, Glassnode
39
+ POLYGON: ${{ secrets.POLYGON }}
40
+ ALPACA_PAPER: ${{ secrets.ALPACA_PAPER }}
41
+ ALPACA_PAPER_SECRET: ${{ secrets.ALPACA_PAPER_SECRET }}
42
+ BLS: ${{ secrets.BLS }}
43
+ GLASSNODE: ${{ secrets.GLASSNODE }}
44
+ # AlpacaEx (the Alpaca paper keys above), Binance, Kraken
45
+ BINANCE_TESTNET_KEY: ${{ secrets.BINANCE_TESTNET_KEY }}
46
+ BINANCE_TESTNET_SECRET: ${{ secrets.BINANCE_TESTNET_SECRET }}
47
+ KRAKEN_KEY: ${{ secrets.KRAKEN_KEY }}
48
+ KRAKEN_SECRET: ${{ secrets.KRAKEN_SECRET }}
49
+ # Robinhood
50
+ RH_USERNAME: ${{ secrets.RH_USERNAME }}
51
+ RH_PASSWORD: ${{ secrets.RH_PASSWORD }}
52
+ RH_2FA: ${{ secrets.RH_2FA }}
53
+ # One process (-n 0), so the live calls keep to each provider's rate limit.
54
+ run: uv run --locked python -m pytest -m integration -n 0 tests/integration
@@ -0,0 +1,43 @@
1
+ # This workflow will automatically update data files
2
+ # For more information see: https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule
3
+
4
+ name: Intraday
5
+
6
+ on:
7
+ schedule:
8
+ - cron: "30 19 * * *"
9
+ # 2:30pm EST every day (for crypto)
10
+ workflow_dispatch:
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ jobs:
16
+ build:
17
+ runs-on: ubuntu-latest
18
+
19
+ steps:
20
+ - name: Checkout repo
21
+ uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
25
+ with:
26
+ python-version: '3.11'
27
+
28
+ - name: Install uv
29
+ uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
30
+ with:
31
+ enable-cache: true
32
+
33
+ - name: Install dependencies
34
+ run: make ci
35
+
36
+ - name: Update Intraday OHLC
37
+ env:
38
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
39
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
40
+ AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
41
+ S3_BUCKET: ${{ secrets.S3_BUCKET }}
42
+ POLYGON: ${{ secrets.POLYGON }}
43
+ run: uv run --frozen --no-dev python scripts/update_intraday.py
@@ -0,0 +1,35 @@
1
+ name: Keep Alive
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "0 0 * * *"
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ build:
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - name: Checkout repo
17
+ uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
18
+
19
+ - name: Set up Python
20
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
21
+ with:
22
+ python-version: '3.11'
23
+
24
+ - name: Install uv
25
+ uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
26
+ with:
27
+ enable-cache: true
28
+
29
+ - name: Install dependencies
30
+ run: make ci
31
+
32
+ - name: Enable workflows
33
+ env:
34
+ GITHUB: ${{ secrets.GITHUB }}
35
+ run: uv run --frozen --no-dev --group keepalive python util/keepalive.py
@@ -0,0 +1,63 @@
1
+ # This workflow will install Python dependencies, run tests and lint with a single version of Python
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
+
4
+ name: Model Creation
5
+
6
+ on:
7
+ workflow_dispatch:
8
+ schedule:
9
+ # every hour on the 15th of each month
10
+ # - cron: "0 * 15 * *"
11
+ # try every 90 mins of the 15th?
12
+ # so no overlap between runs
13
+ - cron: "*/90 * 15 * *"
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ build:
20
+ runs-on: ubuntu-latest
21
+ strategy:
22
+ matrix:
23
+ order: [2]
24
+ window: [14]
25
+ # trial: [1, 2, 3, 4, 5]
26
+ fail-fast: false
27
+ steps:
28
+ - name: Checkout repo
29
+ uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
30
+
31
+ - name: Set up Python
32
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
33
+ with:
34
+ python-version: '3.11'
35
+
36
+ - name: Install uv
37
+ uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
38
+ with:
39
+ enable-cache: true
40
+
41
+ - name: Install dependencies
42
+ run: make ci
43
+
44
+ - name: Decrypt script
45
+ env:
46
+ RH_PASSWORD: ${{ secrets.RH_PASSWORD }}
47
+ SALT: ${{ secrets.SALT }}
48
+ run: uv run --frozen --no-dev python util/decrypt.py encrypted/create_model.py
49
+
50
+ - name: Create model
51
+ env:
52
+ # EVENT: ${{ github.event_name }}
53
+ ORDER: ${{ matrix.order }}
54
+ WINDOW: ${{ matrix.window }}
55
+ # TRIAL: ${{ matrix.trial }}
56
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
57
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
58
+ AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
59
+ S3_BUCKET: ${{ secrets.S3_BUCKET }}
60
+ run: uv run --frozen --no-dev python encrypted/create_model.py
61
+
62
+ # Add step to create visualization after automating model creation
63
+ # Should be able to copy step from visualize.yml
@@ -0,0 +1,46 @@
1
+ # This workflow will automatically update data files
2
+ # For more information see: https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule
3
+
4
+ name: OHLC
5
+
6
+ on:
7
+ schedule:
8
+ - cron: "0 16 * * *"
9
+ # 11am EST every day (for crypto)
10
+ workflow_dispatch:
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ jobs:
16
+ build:
17
+ runs-on: ubuntu-latest
18
+ timeout-minutes: 75
19
+
20
+ steps:
21
+ - name: Checkout repo
22
+ uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
23
+
24
+ - name: Set up Python
25
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
26
+ with:
27
+ python-version: '3.11'
28
+
29
+ - name: Install uv
30
+ uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
31
+ with:
32
+ enable-cache: true
33
+
34
+ - name: Install dependencies
35
+ run: make ci
36
+
37
+ - name: Update OHLC
38
+ env:
39
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
40
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
41
+ AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
42
+ S3_BUCKET: ${{ secrets.S3_BUCKET }}
43
+ POLYGON: ${{ secrets.POLYGON }}
44
+ ALPACA: ${{ secrets.ALPACA }}
45
+ ALPACA_SECRET: ${{ secrets.ALPACA_SECRET }}
46
+ run: uv run --frozen --no-dev python scripts/update_ohlc.py
@@ -0,0 +1,49 @@
1
+ # This workflow will install Python dependencies, run tests and lint with a single version of Python
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
+
4
+ name: Optimize Portfolio
5
+
6
+ on:
7
+ schedule:
8
+ - cron: "15 13 1-7 * *"
9
+ # 09:15am EDT
10
+ workflow_dispatch:
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ jobs:
16
+ build:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Checkout repo
20
+ uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
21
+
22
+ - name: Set up Python
23
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
24
+ with:
25
+ python-version: '3.11'
26
+
27
+ - name: Install uv
28
+ uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
29
+ with:
30
+ enable-cache: true
31
+
32
+ - name: Install dependencies
33
+ run: make ci
34
+
35
+ - name: Decrypt script
36
+ env:
37
+ RH_PASSWORD: ${{ secrets.RH_PASSWORD }}
38
+ SALT: ${{ secrets.SALT }}
39
+ run: uv run --frozen --no-dev python util/decrypt.py encrypted/optimize_portfolio.py
40
+
41
+ - name: Optimize portfolio
42
+ env:
43
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
44
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
45
+ AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
46
+ S3_BUCKET: ${{ secrets.S3_BUCKET }}
47
+ ALPACA: ${{ secrets.ALPACA }}
48
+ ALPACA_SECRET: ${{ secrets.ALPACA_SECRET }}
49
+ run: uv run --frozen --no-dev python encrypted/optimize_portfolio.py