Metadata-Version: 2.4
Name: hodlvn
Version: 0.1.1
Summary: HODL Lab — indicators, strategies and portfolio backtests for Vietnamese stocks on HODL data (requires a Loyalty API key)
License: Proprietary
Project-URL: Homepage, https://hodl.vn/lab
Project-URL: Documentation, https://hodl.vn/lab/docs
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: pandas>=2.0
Requires-Dist: numpy>=1.24

# 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](https://hodl.vn/lab), so SDK and web results match to the dong.

```bash
pip install hodlvn
export HODL_API_KEY=hodl_...        # create one at hodl.vn/tai-khoan/ket-noi-ai (Loyalty membership)
```

```python
import hodl
lab = hodl.Client()
res = lab.run('universe("HX-BANK")\nrebalance("M")\npick(top(momentum(63), 3))', kind="portfolio", start="2021-01-04")
print(res["summary"])
```

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
