orbiter-crypto 0.2.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 (40) hide show
  1. orbiter_crypto-0.2.0/.github/FUNDING.yml +1 -0
  2. orbiter_crypto-0.2.0/.github/workflows/publish.yml +34 -0
  3. orbiter_crypto-0.2.0/.github/workflows/test.yml +25 -0
  4. orbiter_crypto-0.2.0/.gitignore +14 -0
  5. orbiter_crypto-0.2.0/CLAUDE.md +29 -0
  6. orbiter_crypto-0.2.0/LICENSE +65 -0
  7. orbiter_crypto-0.2.0/PKG-INFO +562 -0
  8. orbiter_crypto-0.2.0/README.md +461 -0
  9. orbiter_crypto-0.2.0/assets/orbiter-banner.png +0 -0
  10. orbiter_crypto-0.2.0/assets/orbiter-social.png +0 -0
  11. orbiter_crypto-0.2.0/assets/screenshots/allocation-metrics.png +0 -0
  12. orbiter_crypto-0.2.0/assets/screenshots/dashboard-full.png +0 -0
  13. orbiter_crypto-0.2.0/assets/screenshots/efficient-frontier.png +0 -0
  14. orbiter_crypto-0.2.0/pyproject.toml +59 -0
  15. orbiter_crypto-0.2.0/src/orbiter/__init__.py +7 -0
  16. orbiter_crypto-0.2.0/src/orbiter/backtest.py +96 -0
  17. orbiter_crypto-0.2.0/src/orbiter/cli.py +349 -0
  18. orbiter_crypto-0.2.0/src/orbiter/costs.py +84 -0
  19. orbiter_crypto-0.2.0/src/orbiter/covariance.py +61 -0
  20. orbiter_crypto-0.2.0/src/orbiter/dashboard.py +321 -0
  21. orbiter_crypto-0.2.0/src/orbiter/data.py +147 -0
  22. orbiter_crypto-0.2.0/src/orbiter/data_sources.py +184 -0
  23. orbiter_crypto-0.2.0/src/orbiter/factors.py +220 -0
  24. orbiter_crypto-0.2.0/src/orbiter/metrics.py +107 -0
  25. orbiter_crypto-0.2.0/src/orbiter/optimize.py +324 -0
  26. orbiter_crypto-0.2.0/src/orbiter/rebalance.py +155 -0
  27. orbiter_crypto-0.2.0/src/orbiter/regime.py +84 -0
  28. orbiter_crypto-0.2.0/src/orbiter/stress.py +188 -0
  29. orbiter_crypto-0.2.0/tests/__init__.py +0 -0
  30. orbiter_crypto-0.2.0/tests/conftest.py +43 -0
  31. orbiter_crypto-0.2.0/tests/test_backtest.py +62 -0
  32. orbiter_crypto-0.2.0/tests/test_costs.py +48 -0
  33. orbiter_crypto-0.2.0/tests/test_covariance.py +64 -0
  34. orbiter_crypto-0.2.0/tests/test_data_sources.py +71 -0
  35. orbiter_crypto-0.2.0/tests/test_factors.py +82 -0
  36. orbiter_crypto-0.2.0/tests/test_metrics.py +100 -0
  37. orbiter_crypto-0.2.0/tests/test_optimize.py +99 -0
  38. orbiter_crypto-0.2.0/tests/test_rebalance.py +95 -0
  39. orbiter_crypto-0.2.0/tests/test_regime.py +72 -0
  40. orbiter_crypto-0.2.0/tests/test_stress.py +76 -0
@@ -0,0 +1 @@
1
+ buy_me_a_coffee: borghei
@@ -0,0 +1,34 @@
1
+ name: Publish Package
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: write
9
+ id-token: write
10
+
11
+ jobs:
12
+ publish:
13
+ name: Build & Publish
14
+ runs-on: ubuntu-latest
15
+ environment: pypi
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: actions/setup-python@v5
19
+ with:
20
+ python-version: "3.13"
21
+
22
+ - name: Build package
23
+ run: |
24
+ pip install build
25
+ python -m build
26
+
27
+ - name: Publish to PyPI
28
+ uses: pypa/gh-action-pypi-publish@release/v1
29
+
30
+ - name: Upload to GitHub Release
31
+ env:
32
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33
+ run: |
34
+ gh release upload ${{ github.event.release.tag_name }} dist/*
@@ -0,0 +1,25 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.11", "3.12", "3.13"]
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: ${{ matrix.python-version }}
20
+ - name: Install dependencies
21
+ run: pip install -e ".[dev]"
22
+ - name: Lint
23
+ run: ruff check src/ tests/
24
+ - name: Test
25
+ run: pytest
@@ -0,0 +1,14 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.pyo
4
+ .venv/
5
+ venv/
6
+ dist/
7
+ build/
8
+ *.egg-info/
9
+ .ruff_cache/
10
+ .pytest_cache/
11
+ .coverage
12
+ htmlcov/
13
+ *.egg
14
+ .DS_Store
@@ -0,0 +1,29 @@
1
+ # Orbiter Development Guide
2
+
3
+ ## Setup
4
+ uv venv && source .venv/bin/activate && uv pip install -e ".[dev,dashboard]"
5
+
6
+ ## Commands
7
+ - Run tests: pytest
8
+ - Run single test: pytest tests/test_metrics.py::test_sharpe_ratio -v
9
+ - Lint: ruff check src/ tests/
10
+ - Format: ruff format src/ tests/
11
+ - CLI: orbiter optimize BTC ETH SOL --strategy max-sharpe
12
+ - Dashboard: streamlit run src/orbiter/dashboard.py
13
+
14
+ ## Architecture
15
+ - src/orbiter/data.py — price fetching via ccxt
16
+ - src/orbiter/metrics.py — pure functions, no side effects
17
+ - src/orbiter/covariance.py — covariance matrix estimators
18
+ - src/orbiter/optimize.py — PortfolioOptimizer class, all strategies
19
+ - src/orbiter/backtest.py — walk-forward engine
20
+ - src/orbiter/cli.py — Click CLI
21
+ - src/orbiter/dashboard.py — Streamlit app
22
+
23
+ ## Conventions
24
+ - Log returns throughout (not simple returns)
25
+ - Type hints on all public functions
26
+ - Docstrings: Google style, only where logic isn't obvious
27
+ - All optimization assumes long-only (no short selling)
28
+ - Default periods_per_year=365 (crypto trades 24/7)
29
+ - Default covariance method: ledoit-wolf
@@ -0,0 +1,65 @@
1
+ Commons Clause License Condition v1.0 + MIT
2
+
3
+ The Software is provided to you by the Licensor under the License, as
4
+ defined below, subject to the following condition.
5
+
6
+ Without limiting other conditions in the License, the grant of rights under
7
+ the License will not include, and the License does not grant to you, the
8
+ right to Sell the Software.
9
+
10
+ For purposes of the foregoing, "Sell" means practicing any or all of the
11
+ rights granted to you under the License to provide to third parties, for a
12
+ fee or other consideration (including without limitation fees for hosting or
13
+ consulting/support services related to the Software), a product or service
14
+ whose value derives, entirely or substantially, from the functionality of
15
+ the Software. Any license notice or attribution required by the License must
16
+ also include this Commons Clause License Condition notice.
17
+
18
+ Software: Orbiter
19
+ License: MIT
20
+ Licensor: Brian Borghei (borghei)
21
+
22
+ ---
23
+
24
+ MIT License
25
+
26
+ Copyright (c) 2025-2026 Brian Borghei
27
+
28
+ Permission is hereby granted, free of charge, to any person obtaining a copy
29
+ of this software and associated documentation files (the "Software"), to deal
30
+ in the Software without restriction, including without limitation the rights
31
+ to use, copy, modify, merge, publish, and distribute copies of the Software,
32
+ and to permit persons to whom the Software is furnished to do so, subject to
33
+ the following conditions:
34
+
35
+ The above copyright notice, this permission notice, and the Commons Clause
36
+ condition shall be included in all copies or substantial portions of the
37
+ Software.
38
+
39
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
40
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
41
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
42
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
43
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
44
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
45
+ SOFTWARE.
46
+
47
+ ---
48
+
49
+ PLAIN LANGUAGE SUMMARY (not a legal substitute):
50
+
51
+ You CAN:
52
+ - Use this software freely in open-source projects
53
+ - Use this software for personal, educational, and internal business use
54
+ - Modify, fork, and distribute the software
55
+ - Use the tools and modules in your own workflows
56
+
57
+ You CANNOT:
58
+ - Sell this software or substantially similar copies of it
59
+ - Repackage Orbiter as a paid product or service
60
+ - Offer a commercial hosted service whose primary value comes from this software
61
+ - Remove the license or attribution notices
62
+
63
+ You MUST:
64
+ - Include this license in any copies or distributions
65
+ - Give attribution to the original project