volas 0.0.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.
- volas-0.0.0/.gitignore +34 -0
- volas-0.0.0/Cargo.lock +173 -0
- volas-0.0.0/Cargo.toml +27 -0
- volas-0.0.0/LICENSE +21 -0
- volas-0.0.0/Makefile +91 -0
- volas-0.0.0/PKG-INFO +112 -0
- volas-0.0.0/README.md +75 -0
- volas-0.0.0/pyproject.toml +64 -0
- volas-0.0.0/src/lib.rs +13 -0
- volas-0.0.0/volas/__init__.py +7 -0
volas-0.0.0/.gitignore
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
/dist
|
|
7
|
+
/build
|
|
8
|
+
|
|
9
|
+
# Compiled extensions
|
|
10
|
+
*.so
|
|
11
|
+
*.pyd
|
|
12
|
+
*.dll
|
|
13
|
+
|
|
14
|
+
# Rust
|
|
15
|
+
/target
|
|
16
|
+
Cargo.lock
|
|
17
|
+
|
|
18
|
+
# Testing / coverage
|
|
19
|
+
/.pytest_cache
|
|
20
|
+
/.coverage
|
|
21
|
+
.coverage.*
|
|
22
|
+
htmlcov/
|
|
23
|
+
/.benchmarks
|
|
24
|
+
|
|
25
|
+
# Tooling caches
|
|
26
|
+
/.ruff_cache
|
|
27
|
+
/.mypy_cache
|
|
28
|
+
|
|
29
|
+
# OS / editor
|
|
30
|
+
.DS_Store
|
|
31
|
+
._*
|
|
32
|
+
.idea/
|
|
33
|
+
.vscode/
|
|
34
|
+
*.swp
|
volas-0.0.0/Cargo.lock
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "autocfg"
|
|
7
|
+
version = "1.5.1"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "heck"
|
|
13
|
+
version = "0.5.0"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
16
|
+
|
|
17
|
+
[[package]]
|
|
18
|
+
name = "indoc"
|
|
19
|
+
version = "2.0.7"
|
|
20
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
21
|
+
checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
|
|
22
|
+
dependencies = [
|
|
23
|
+
"rustversion",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[[package]]
|
|
27
|
+
name = "libc"
|
|
28
|
+
version = "0.2.186"
|
|
29
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
30
|
+
checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
|
|
31
|
+
|
|
32
|
+
[[package]]
|
|
33
|
+
name = "memoffset"
|
|
34
|
+
version = "0.9.1"
|
|
35
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
36
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
37
|
+
dependencies = [
|
|
38
|
+
"autocfg",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[[package]]
|
|
42
|
+
name = "once_cell"
|
|
43
|
+
version = "1.21.4"
|
|
44
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
45
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
46
|
+
|
|
47
|
+
[[package]]
|
|
48
|
+
name = "portable-atomic"
|
|
49
|
+
version = "1.13.1"
|
|
50
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
51
|
+
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
|
|
52
|
+
|
|
53
|
+
[[package]]
|
|
54
|
+
name = "proc-macro2"
|
|
55
|
+
version = "1.0.106"
|
|
56
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
57
|
+
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
|
58
|
+
dependencies = [
|
|
59
|
+
"unicode-ident",
|
|
60
|
+
]
|
|
61
|
+
|
|
62
|
+
[[package]]
|
|
63
|
+
name = "pyo3"
|
|
64
|
+
version = "0.25.1"
|
|
65
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
66
|
+
checksum = "8970a78afe0628a3e3430376fc5fd76b6b45c4d43360ffd6cdd40bdde72b682a"
|
|
67
|
+
dependencies = [
|
|
68
|
+
"indoc",
|
|
69
|
+
"libc",
|
|
70
|
+
"memoffset",
|
|
71
|
+
"once_cell",
|
|
72
|
+
"portable-atomic",
|
|
73
|
+
"pyo3-build-config",
|
|
74
|
+
"pyo3-ffi",
|
|
75
|
+
"pyo3-macros",
|
|
76
|
+
"unindent",
|
|
77
|
+
]
|
|
78
|
+
|
|
79
|
+
[[package]]
|
|
80
|
+
name = "pyo3-build-config"
|
|
81
|
+
version = "0.25.1"
|
|
82
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
83
|
+
checksum = "458eb0c55e7ece017adeba38f2248ff3ac615e53660d7c71a238d7d2a01c7598"
|
|
84
|
+
dependencies = [
|
|
85
|
+
"once_cell",
|
|
86
|
+
"target-lexicon",
|
|
87
|
+
]
|
|
88
|
+
|
|
89
|
+
[[package]]
|
|
90
|
+
name = "pyo3-ffi"
|
|
91
|
+
version = "0.25.1"
|
|
92
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
93
|
+
checksum = "7114fe5457c61b276ab77c5055f206295b812608083644a5c5b2640c3102565c"
|
|
94
|
+
dependencies = [
|
|
95
|
+
"libc",
|
|
96
|
+
"pyo3-build-config",
|
|
97
|
+
]
|
|
98
|
+
|
|
99
|
+
[[package]]
|
|
100
|
+
name = "pyo3-macros"
|
|
101
|
+
version = "0.25.1"
|
|
102
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
103
|
+
checksum = "a8725c0a622b374d6cb051d11a0983786448f7785336139c3c94f5aa6bef7e50"
|
|
104
|
+
dependencies = [
|
|
105
|
+
"proc-macro2",
|
|
106
|
+
"pyo3-macros-backend",
|
|
107
|
+
"quote",
|
|
108
|
+
"syn",
|
|
109
|
+
]
|
|
110
|
+
|
|
111
|
+
[[package]]
|
|
112
|
+
name = "pyo3-macros-backend"
|
|
113
|
+
version = "0.25.1"
|
|
114
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
115
|
+
checksum = "4109984c22491085343c05b0dbc54ddc405c3cf7b4374fc533f5c3313a572ccc"
|
|
116
|
+
dependencies = [
|
|
117
|
+
"heck",
|
|
118
|
+
"proc-macro2",
|
|
119
|
+
"pyo3-build-config",
|
|
120
|
+
"quote",
|
|
121
|
+
"syn",
|
|
122
|
+
]
|
|
123
|
+
|
|
124
|
+
[[package]]
|
|
125
|
+
name = "quote"
|
|
126
|
+
version = "1.0.45"
|
|
127
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
128
|
+
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
|
129
|
+
dependencies = [
|
|
130
|
+
"proc-macro2",
|
|
131
|
+
]
|
|
132
|
+
|
|
133
|
+
[[package]]
|
|
134
|
+
name = "rustversion"
|
|
135
|
+
version = "1.0.22"
|
|
136
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
137
|
+
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
|
138
|
+
|
|
139
|
+
[[package]]
|
|
140
|
+
name = "syn"
|
|
141
|
+
version = "2.0.117"
|
|
142
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
143
|
+
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
|
144
|
+
dependencies = [
|
|
145
|
+
"proc-macro2",
|
|
146
|
+
"quote",
|
|
147
|
+
"unicode-ident",
|
|
148
|
+
]
|
|
149
|
+
|
|
150
|
+
[[package]]
|
|
151
|
+
name = "target-lexicon"
|
|
152
|
+
version = "0.13.5"
|
|
153
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
154
|
+
checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
|
|
155
|
+
|
|
156
|
+
[[package]]
|
|
157
|
+
name = "unicode-ident"
|
|
158
|
+
version = "1.0.24"
|
|
159
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
160
|
+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
161
|
+
|
|
162
|
+
[[package]]
|
|
163
|
+
name = "unindent"
|
|
164
|
+
version = "0.2.4"
|
|
165
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
166
|
+
checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
|
|
167
|
+
|
|
168
|
+
[[package]]
|
|
169
|
+
name = "volas_rs"
|
|
170
|
+
version = "0.0.0"
|
|
171
|
+
dependencies = [
|
|
172
|
+
"pyo3",
|
|
173
|
+
]
|
volas-0.0.0/Cargo.toml
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "volas_rs"
|
|
3
|
+
version = "0.0.0"
|
|
4
|
+
edition = "2021"
|
|
5
|
+
authors = ["Kael Zhang <i+pypi@kael.me>"]
|
|
6
|
+
description = "High-performance Rust core for the volas time-series kernel"
|
|
7
|
+
license = "MIT"
|
|
8
|
+
homepage = "https://github.com/kaelzhang/volas"
|
|
9
|
+
repository = "https://github.com/kaelzhang/volas"
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
|
|
12
|
+
[lib]
|
|
13
|
+
name = "volas_rs"
|
|
14
|
+
crate-type = ["cdylib"]
|
|
15
|
+
|
|
16
|
+
[dependencies]
|
|
17
|
+
pyo3 = { version = "0.25", features = ["extension-module"] }
|
|
18
|
+
|
|
19
|
+
[features]
|
|
20
|
+
default = []
|
|
21
|
+
# Enable this feature to skip building the extension module
|
|
22
|
+
extension-module = ["pyo3/extension-module"]
|
|
23
|
+
|
|
24
|
+
[profile.release]
|
|
25
|
+
lto = true
|
|
26
|
+
codegen-units = 1
|
|
27
|
+
opt-level = 3
|
volas-0.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kael Zhang and contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
volas-0.0.0/Makefile
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
files = volas test *.py
|
|
2
|
+
test_files = *
|
|
3
|
+
|
|
4
|
+
.PHONY: install install-rust build build-pkg build-ext clean test lint fix fmt check cargo-test upload publish dev ci
|
|
5
|
+
|
|
6
|
+
# Install all dependencies (Python + Rust)
|
|
7
|
+
install:
|
|
8
|
+
@echo "\033[1m>> Installing Rust toolchain... <<\033[0m"
|
|
9
|
+
@which rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
10
|
+
@rustup update stable
|
|
11
|
+
@echo "\033[1m>> Installing maturin... <<\033[0m"
|
|
12
|
+
@pip install maturin
|
|
13
|
+
@echo "\033[1m>> Installing Python dependencies... <<\033[0m"
|
|
14
|
+
@pip install -e .[dev]
|
|
15
|
+
|
|
16
|
+
# Install only the Rust toolchain
|
|
17
|
+
install-rust:
|
|
18
|
+
@which rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
19
|
+
@rustup update stable
|
|
20
|
+
|
|
21
|
+
# Build the Rust extension and install the package in-place (development)
|
|
22
|
+
build: clean
|
|
23
|
+
@echo "\033[1m>> Building Rust extension... <<\033[0m"
|
|
24
|
+
@maturin develop --release
|
|
25
|
+
@echo "\033[1m>> Build complete! <<\033[0m"
|
|
26
|
+
|
|
27
|
+
# Build the release package (wheel and sdist) into dist/
|
|
28
|
+
build-pkg: clean
|
|
29
|
+
@echo "\033[1m>> Building release package... <<\033[0m"
|
|
30
|
+
@maturin build --release --sdist -o dist
|
|
31
|
+
@echo "\033[1m>> Package built in dist/ <<\033[0m"
|
|
32
|
+
|
|
33
|
+
# Build the Rust extension only (development mode)
|
|
34
|
+
build-ext:
|
|
35
|
+
@maturin develop
|
|
36
|
+
|
|
37
|
+
# Clean build artifacts
|
|
38
|
+
clean:
|
|
39
|
+
rm -rf dist build target/wheels
|
|
40
|
+
rm -rf volas/*.so volas_rs/*.so
|
|
41
|
+
rm -rf *.egg-info
|
|
42
|
+
rm -rf .eggs
|
|
43
|
+
rm -rf .coverage .coverage.* htmlcov
|
|
44
|
+
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
|
|
45
|
+
find . -type f -name "*.pyc" -delete 2>/dev/null || true
|
|
46
|
+
|
|
47
|
+
# Run tests
|
|
48
|
+
test:
|
|
49
|
+
pytest -s -v test/test_$(test_files).py --doctest-modules --cov volas --cov-report term-missing
|
|
50
|
+
|
|
51
|
+
# Run linters
|
|
52
|
+
lint:
|
|
53
|
+
@echo "\033[1m>> Running ruff... <<\033[0m"
|
|
54
|
+
@ruff check $(files)
|
|
55
|
+
@echo "\033[1m>> Running mypy... <<\033[0m"
|
|
56
|
+
@mypy $(files)
|
|
57
|
+
@echo "\033[1m>> Running cargo check... <<\033[0m"
|
|
58
|
+
@cargo check
|
|
59
|
+
|
|
60
|
+
# Auto-fix lint issues
|
|
61
|
+
fix:
|
|
62
|
+
ruff check --fix $(files)
|
|
63
|
+
cargo fmt
|
|
64
|
+
|
|
65
|
+
# Format Rust code
|
|
66
|
+
fmt:
|
|
67
|
+
cargo fmt
|
|
68
|
+
|
|
69
|
+
# Check Rust code
|
|
70
|
+
check:
|
|
71
|
+
cargo check
|
|
72
|
+
cargo clippy
|
|
73
|
+
|
|
74
|
+
# Run Rust unit tests
|
|
75
|
+
cargo-test:
|
|
76
|
+
cargo test
|
|
77
|
+
|
|
78
|
+
# Upload to PyPI
|
|
79
|
+
upload:
|
|
80
|
+
twine upload --config-file ~/.pypirc -r pypi dist/* --verbose
|
|
81
|
+
|
|
82
|
+
# Publish (build package + upload)
|
|
83
|
+
publish:
|
|
84
|
+
make build-pkg
|
|
85
|
+
make upload
|
|
86
|
+
|
|
87
|
+
# Development workflow: build and test
|
|
88
|
+
dev: build test
|
|
89
|
+
|
|
90
|
+
# Full CI check
|
|
91
|
+
ci: lint cargo-test test
|
volas-0.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: volas
|
|
3
|
+
Version: 0.0.0
|
|
4
|
+
Classifier: Programming Language :: Python
|
|
5
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
6
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
7
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
8
|
+
Classifier: Programming Language :: Rust
|
|
9
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
10
|
+
Classifier: Natural Language :: English
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Development Status :: 1 - Planning
|
|
15
|
+
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
16
|
+
Requires-Dist: numpy>=2.0.0
|
|
17
|
+
Requires-Dist: coverage ; extra == 'dev'
|
|
18
|
+
Requires-Dist: ruff ; extra == 'dev'
|
|
19
|
+
Requires-Dist: pytest ; extra == 'dev'
|
|
20
|
+
Requires-Dist: pytest-cov ; extra == 'dev'
|
|
21
|
+
Requires-Dist: pytest-benchmark ; extra == 'dev'
|
|
22
|
+
Requires-Dist: twine ; extra == 'dev'
|
|
23
|
+
Requires-Dist: packaging>=24.2 ; extra == 'dev'
|
|
24
|
+
Requires-Dist: numpy>=2.0.0 ; extra == 'dev'
|
|
25
|
+
Requires-Dist: mypy ; extra == 'dev'
|
|
26
|
+
Requires-Dist: maturin>=1.4 ; extra == 'dev'
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Summary: High-performance, Rust-backed columnar kernel for stock / candlestick (OHLCV) time-series data.
|
|
30
|
+
Home-Page: https://github.com/kaelzhang/volas
|
|
31
|
+
Author-email: Kael Zhang <i+pypi@kael.me>
|
|
32
|
+
License-Expression: MIT
|
|
33
|
+
Requires-Python: >=3.11
|
|
34
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
35
|
+
Project-URL: Homepage, https://github.com/kaelzhang/volas
|
|
36
|
+
|
|
37
|
+
# volas
|
|
38
|
+
|
|
39
|
+
> High-performance, Rust-backed columnar kernel for stock / candlestick (OHLCV) time-series data.
|
|
40
|
+
|
|
41
|
+
**Status:** early development — version `0.0.0`. APIs are not yet stable and may change at any time.
|
|
42
|
+
|
|
43
|
+
## What is volas?
|
|
44
|
+
|
|
45
|
+
`volas` is a focused, DataFrame-like data structure purpose-built for financial
|
|
46
|
+
candlestick (OHLCV) time series and quantitative-trading workflows.
|
|
47
|
+
|
|
48
|
+
Rather than being a general-purpose DataFrame, `volas` supports only what this
|
|
49
|
+
domain needs — a time-indexed, two-dimensional table of numeric and boolean
|
|
50
|
+
columns — and implements its storage and compute core in **Rust** for low,
|
|
51
|
+
predictable latency on incremental ("append one bar") workloads.
|
|
52
|
+
|
|
53
|
+
### Goals
|
|
54
|
+
|
|
55
|
+
- **Live-trading first** — optimized for the incremental hot path: append a new
|
|
56
|
+
bar, update indicators, read the result, with minimal per-bar latency.
|
|
57
|
+
- **Small, regular data model** — a time index plus 2-D columns of numbers and
|
|
58
|
+
booleans; no multi-level indexes, no heterogeneous storage, no general-purpose
|
|
59
|
+
reshaping.
|
|
60
|
+
- **Rust core** — storage and computation live in a compiled Rust extension.
|
|
61
|
+
- **First-class NumPy interop** — zero-copy `to_numpy` export, designed so data
|
|
62
|
+
flows cheaply into NumPy and `torch.Tensor` for both training and inference.
|
|
63
|
+
|
|
64
|
+
## Installation
|
|
65
|
+
|
|
66
|
+
> Not yet published to PyPI. For a local build, see [Development](#development).
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
pip install volas
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Requires Python >= 3.11.
|
|
73
|
+
|
|
74
|
+
## Usage
|
|
75
|
+
|
|
76
|
+
> Preview of the intended API. Not yet implemented at `0.0.0`; subject to change.
|
|
77
|
+
|
|
78
|
+
```py
|
|
79
|
+
from volas import Volas
|
|
80
|
+
|
|
81
|
+
v = Volas({
|
|
82
|
+
'open': [...],
|
|
83
|
+
'high': [...],
|
|
84
|
+
'low': [...],
|
|
85
|
+
'close': [...],
|
|
86
|
+
'volume': [...],
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
# Zero-copy export to NumPy (where possible)
|
|
90
|
+
close = v['close'].to_numpy()
|
|
91
|
+
matrix = v.to_numpy()
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Development
|
|
95
|
+
|
|
96
|
+
Requires Python >= 3.11 and a Rust toolchain.
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
# Build the Rust extension and install the package in-place (development)
|
|
100
|
+
make build
|
|
101
|
+
|
|
102
|
+
# Build a release wheel + sdist into dist/
|
|
103
|
+
make build-pkg
|
|
104
|
+
|
|
105
|
+
# Publish to PyPI (build + upload)
|
|
106
|
+
make publish
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## License
|
|
110
|
+
|
|
111
|
+
[MIT](LICENSE)
|
|
112
|
+
|
volas-0.0.0/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# volas
|
|
2
|
+
|
|
3
|
+
> High-performance, Rust-backed columnar kernel for stock / candlestick (OHLCV) time-series data.
|
|
4
|
+
|
|
5
|
+
**Status:** early development — version `0.0.0`. APIs are not yet stable and may change at any time.
|
|
6
|
+
|
|
7
|
+
## What is volas?
|
|
8
|
+
|
|
9
|
+
`volas` is a focused, DataFrame-like data structure purpose-built for financial
|
|
10
|
+
candlestick (OHLCV) time series and quantitative-trading workflows.
|
|
11
|
+
|
|
12
|
+
Rather than being a general-purpose DataFrame, `volas` supports only what this
|
|
13
|
+
domain needs — a time-indexed, two-dimensional table of numeric and boolean
|
|
14
|
+
columns — and implements its storage and compute core in **Rust** for low,
|
|
15
|
+
predictable latency on incremental ("append one bar") workloads.
|
|
16
|
+
|
|
17
|
+
### Goals
|
|
18
|
+
|
|
19
|
+
- **Live-trading first** — optimized for the incremental hot path: append a new
|
|
20
|
+
bar, update indicators, read the result, with minimal per-bar latency.
|
|
21
|
+
- **Small, regular data model** — a time index plus 2-D columns of numbers and
|
|
22
|
+
booleans; no multi-level indexes, no heterogeneous storage, no general-purpose
|
|
23
|
+
reshaping.
|
|
24
|
+
- **Rust core** — storage and computation live in a compiled Rust extension.
|
|
25
|
+
- **First-class NumPy interop** — zero-copy `to_numpy` export, designed so data
|
|
26
|
+
flows cheaply into NumPy and `torch.Tensor` for both training and inference.
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
> Not yet published to PyPI. For a local build, see [Development](#development).
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
pip install volas
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Requires Python >= 3.11.
|
|
37
|
+
|
|
38
|
+
## Usage
|
|
39
|
+
|
|
40
|
+
> Preview of the intended API. Not yet implemented at `0.0.0`; subject to change.
|
|
41
|
+
|
|
42
|
+
```py
|
|
43
|
+
from volas import Volas
|
|
44
|
+
|
|
45
|
+
v = Volas({
|
|
46
|
+
'open': [...],
|
|
47
|
+
'high': [...],
|
|
48
|
+
'low': [...],
|
|
49
|
+
'close': [...],
|
|
50
|
+
'volume': [...],
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
# Zero-copy export to NumPy (where possible)
|
|
54
|
+
close = v['close'].to_numpy()
|
|
55
|
+
matrix = v.to_numpy()
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Development
|
|
59
|
+
|
|
60
|
+
Requires Python >= 3.11 and a Rust toolchain.
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
# Build the Rust extension and install the package in-place (development)
|
|
64
|
+
make build
|
|
65
|
+
|
|
66
|
+
# Build a release wheel + sdist into dist/
|
|
67
|
+
make build-pkg
|
|
68
|
+
|
|
69
|
+
# Publish to PyPI (build + upload)
|
|
70
|
+
make publish
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["maturin>=1.4,<2.0"]
|
|
3
|
+
build-backend = "maturin"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = 'volas'
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = 'High-performance, Rust-backed columnar kernel for stock / candlestick (OHLCV) time-series data.'
|
|
9
|
+
readme = 'README.md'
|
|
10
|
+
authors = [
|
|
11
|
+
{ name = 'Kael Zhang', email = 'i+pypi@kael.me' }
|
|
12
|
+
]
|
|
13
|
+
license = 'MIT'
|
|
14
|
+
license-files = ['LICENSE']
|
|
15
|
+
requires-python = '>=3.11'
|
|
16
|
+
dependencies = [
|
|
17
|
+
"numpy>=2.0.0"
|
|
18
|
+
]
|
|
19
|
+
classifiers = [
|
|
20
|
+
'Programming Language :: Python',
|
|
21
|
+
'Programming Language :: Python :: 3.11',
|
|
22
|
+
'Programming Language :: Python :: 3.12',
|
|
23
|
+
'Programming Language :: Python :: 3.13',
|
|
24
|
+
'Programming Language :: Rust',
|
|
25
|
+
'Programming Language :: Python :: Implementation :: CPython',
|
|
26
|
+
'Natural Language :: English',
|
|
27
|
+
'Intended Audience :: Developers',
|
|
28
|
+
'Intended Audience :: Financial and Insurance Industry',
|
|
29
|
+
'Operating System :: OS Independent',
|
|
30
|
+
'Development Status :: 1 - Planning',
|
|
31
|
+
'Topic :: Office/Business :: Financial :: Investment'
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
[project.urls]
|
|
35
|
+
Homepage = "https://github.com/kaelzhang/volas"
|
|
36
|
+
|
|
37
|
+
[project.optional-dependencies]
|
|
38
|
+
dev = [
|
|
39
|
+
"coverage",
|
|
40
|
+
"ruff",
|
|
41
|
+
"pytest",
|
|
42
|
+
"pytest-cov",
|
|
43
|
+
"pytest-benchmark",
|
|
44
|
+
"twine",
|
|
45
|
+
# PEP 639 / Metadata 2.4 license fields require packaging >= 24.2 to publish
|
|
46
|
+
"packaging>=24.2",
|
|
47
|
+
"numpy>=2.0.0",
|
|
48
|
+
"mypy",
|
|
49
|
+
"maturin>=1.4"
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
[tool.maturin]
|
|
53
|
+
# The Rust crate builds the `volas_rs` extension module
|
|
54
|
+
module-name = "volas_rs"
|
|
55
|
+
binding = "pyo3"
|
|
56
|
+
features = ["pyo3/extension-module"]
|
|
57
|
+
# Pure-Python package to include alongside the compiled module
|
|
58
|
+
python-packages = ["volas"]
|
|
59
|
+
|
|
60
|
+
[tool.mypy]
|
|
61
|
+
warn_return_any = true
|
|
62
|
+
ignore_missing_imports = true
|
|
63
|
+
no_implicit_optional = true
|
|
64
|
+
strict_optional = true
|
volas-0.0.0/src/lib.rs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//! volas-rs: high-performance Rust core for the `volas` time-series kernel.
|
|
2
|
+
//!
|
|
3
|
+
//! This crate is the compiled backend for the `volas` Python package.
|
|
4
|
+
//! It is currently an empty scaffold; storage and indicator logic will live
|
|
5
|
+
//! here.
|
|
6
|
+
|
|
7
|
+
use pyo3::prelude::*;
|
|
8
|
+
|
|
9
|
+
/// The Rust extension module backing the `volas` package.
|
|
10
|
+
#[pymodule]
|
|
11
|
+
fn volas_rs(_m: &Bound<'_, PyModule>) -> PyResult<()> {
|
|
12
|
+
Ok(())
|
|
13
|
+
}
|