Skip to main content

hodlvn — HODL Lab SDK

Write indicators, strategies and portfolio backtests for Vietnamese stocks on HODL data. This is the same core that runs in the browser at hodl.vn/lab, so SDK and web results match to the dong.

pip install hodlvn
export HODL_API_KEY=hodl_...        # create one at hodl.vn/tai-khoan/ket-noi-ai (Loyalty membership)
import hodl
lab = hodl.Client()
res = lab.run('universe("HX-BANK")\nperiod("5Y")\nrebalance("M")\npick(top(momentum(63), 3))', kind="portfolio")
print(res["summary"])

res = lab.run('ticker("FPT")\nperiod("3Y")\nbuy(crossover(ema(close, 20), ema(close, 50)))\nsell(crossunder(ema(close, 20), ema(close, 50)))',
              kind="strategy")

Scripts declare their own symbol and range with ticker("FPT") and period("5Y") ("1Y", "3Y", "5Y", "10Y", "max" or a date like "2021-01-01"); the symbol / start arguments of run override them. kind="dca" returns an accumulation plan (buy / every / period / months / skip_months) — simulate it at hodl.vn/tich-san.

Backtests apply Vietnamese market rules out of the box: 100-share lots, per-exchange ceiling / floor bands, T+2.5 settlement, 0.15% fees, 0.1% sell tax, cash dividends (5% tax) and bonus shares on their ex-dates, fills at the next session's open after a signal, real prices.

Full guide: https://hodl.vn/lab/docs

Metadata

Release files for hodlvn 0.1.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hodlvn 0.1.12
File Size Uploaded Provenance Actions
hodlvn-0.1.12.tar.gz 34.2 kB Without provenance Details for hodlvn-0.1.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hodlvn 0.1.12
File Interpreter ABI Platform Actions
hodlvn-0.1.12-py3-none-any.whl Python 3 none any Details for hodlvn-0.1.12-py3-none-any.whl

Total release size: 65.0 kB

Release files / hodlvn-0.1.12.tar.gz

Download URL hodlvn-0.1.12.tar.gz
Size 34.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fa3a45f63dc2759bb08ae88a92f3cbfbd2385163f7fabd96badfa6b795c76b2e
BLAKE2b-256 checksum
How to use checksums
1165a4de1d800be1390c2aa2211136b87ffddd12b44bc3517aec689b26833b7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / hodlvn-0.1.12-py3-none-any.whl

Download URL hodlvn-0.1.12-py3-none-any.whl
Size 30.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1404ce1b045ea38585f02f8a23e092feda00b17e60d03e266f6f6dc2c686dda
BLAKE2b-256 checksum
How to use checksums
a23272224d3927c1383404cda6f6ec8cbc00c6847e45d357e7ec5c8652799c58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for hodlvn 0.1.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page