项目 / shashankvemuri/Finance

shashankvemuri/Finance

行业推荐
语言 Python标签 stocksstock-marketfinancepythonmachine-learningdata-sciencetechnical-indicatorsquantitative-financepandasalgorithmic-tradingstocktrading-strategies数据更新 2026-11-25 06:49:28 · 仓库 2026-11-24

一段话介绍

Python toolkit for quantitative finance: stock analysis, technical indicators, strategy backtesting, portfolio optimization, and financial modeling.

本站整理,非 GitHub 官方 description。

官方 description(GitHub API 原样)
Python toolkit for quantitative finance: stock analysis, technical indicators, strategy backtesting, portfolio optimization, and financial modeling.
4,401累计星
389Fork
—峰值日增
0上榜次数
总榜
暂未入榜
日榜
暂未入榜
周榜
暂未入榜
月榜
暂未入榜

官方快照(gh_history.db,2026-11-25):总榜 未进 Top50 · 日榜 未进 Top50 · 周榜未满 7 天基线(官方不生成) · 月榜暂无官方口径;下方四卡为站内趋势聚合(周卡按上榜次数,非官方 7 日增量窗)。

行业与场景

按行业选型 →

量化研究与策略回测

适配系统:量化投研平台、行情终端 · 得分 1.4

内置行情接入、因子计算与回测框架,可作为投研团队的策略实验与绩效归因底座。

更多信息

以下三段按该项目自己的 GitHub README 章节摘录(可合理截断并标明);README 没有对应章节的留空,不编造。

我的用法
在 Python 3.12 及以上用 pip 安装项目,核心依赖为 NumPy 和 pandas,可按需安装数据、组合与模型、图表情感、应用报表等附加功能。
特点或设计要点
核心依赖为 NumPy 和 pandas。模块划分包括数据获取、指标、分析、筛选、策略、回测、投资组合、模型和报告等。示例默认使用合成数据,需要公开行情时可按文档加相应参数;也可用 Streamlit 打开研究应用。文档说明回测按收盘信号、下一开盘执行,并提醒先阅读计算与执行约定再解释结果。本页不介绍下单或实盘接入步骤。
局限和适用边界
仓库内容仅用于教育目的,不构成专业投资建议。
星标走势还差一天的数据,明天就能看到曲线
每天 10:30 记一次星标,连续两天后自动生成曲线
首次发现 — · 最近在榜 2026-09-12 · 语言 Python · 贡献者 —
python

GitHub 项目主页介绍

来自 GitHub 仓库 README / 主页介绍正文,原样摘录,共 4,594 字节。

# Finance

Finance is a Python toolkit for market data, technical indicators, financial analysis,
stock screening, strategy research, backtesting, portfolios and statistical models.
Calculations use explicit inputs, a small dependency set and tested execution conventions.
Models and trading rules are research tools; runnable examples are the starting point.

## Install

Python 3.12 or newer:

```bash
git clone https://github.com/shashankvemuri/Finance.git
cd Finance
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
python -m pip install -e .
```

Core dependencies are NumPy and pandas. Add only the features you need:

```bash
python -m pip install -e '.[data]'             # Public data, Finviz and financial statements
python -m pip install -e '.[portfolio,models]' # Optimization and statistical/ML experiments
python -m pip install -e '.[plot,sentiment]'   # Charts and VADER text scoring
python -m pip install -e '.[apps,reports]'     # Interactive app and Excel exports
```

## Use

Download normalized, consistently adjusted OHLCV with the `data` extra:

```python
from finance.data import YahooFinance

prices = YahooFinance().history('AAPL', '2023-01-01', '2025-01-01')
```

Calculate indicators without any network access:

```python
from finance.indicators import bollinger_bands, rsi

strength = rsi(prices['close'], window=14)
bands = bollinger_bands(prices['close'], window=20)
```

Generate close-time signals and execute them at the next open:

```python
from finance.backtesting import backtest
from finance.strategies import moving_average

targets = moving_average(prices['close'], fast=20, slow=50)
result = backtest(prices['open'], prices['close'], targets, commission=0.001)
print(result.metrics)
```

Returns and rates are fractions; RSI is 0–100. Warm-up values remain missing. The modest
backtester tracks cash, fractional shares, long/short fills, commission, slippage and borrow
costs. Read the [calculation and execution conventions](docs/methodology.md) before interpreting results.

## Explore

| Area | Capabilities |
| --- | --- |
| `data` | OHLCV/intraday, Finviz discovery, statements, calendars, analysts, news, transcripts, insiders and universes |
| `indicators` | Moving averages, momentum, volatility/channels, volume, rolling statistics, pivots and breadth |
| `analytics` | Returns, CAPM/OLS, risk, statement ratios, company/index valuation, seasonal studies and sentiment |
| `screening` | Relative strength, Minervini, Green Line, RSI/trend, growth/ownership and dividend screens |
| `strategies` | Crossovers, MACD, Keltner, Ichimoku, oscillator reversion, pairs and chronological strategy selection |
| `backtesting` | Next-open execution, long/short protective orders, FIFO trade reports, cash accounting and benchmarks |
| `portfolio` | Allocation, constrained optimization/frontier, correlated simulation and lump sum versus DCA |
| `models` | Forecasts/baselines, ARIMA diagnostics, PCA/factors, regimes, clustering, networks and optional neural/Prophet experiments |
| `reports` | Candlesticks, heatmaps, equity charts, CSV/Excel, HTML reports and graph exports |
| `integrations` | Explicit notification transports, order previews and an optional Alpaca client |

[Examples](examples) use synthetic inputs by default. Add `--live` for public data;
`download_market_data.py` always uses the network.

```bash
python examples/calculate_indicators.py
python examples/backtest_moving_average.py --live
python examples/optimize_portfolio.py
python examples/research_watchlist.py --live
python examples/research_models.py
streamlit run apps/research.py
```

Current constituents and fundamentals are snapshots, not historical point-in-time inputs.
Public providers can throttle or change schemas; see [provider contracts](docs/providers.md).
Forecast experiments report held-out errors against simple baselines and make no claim of
predictive advantage. Heavy models and apps are optional; brokerage and delivery require
separate credentials. See [research workflows](docs/workflows.md) for full examples,
optional installs and provider limitations.

[Contributing](CONTRIBUTING.md)

Created by [Shashank Vemuri](https://github.com/shashankvemuri). [MIT License](LICENSE).
Technical-indicator references include
[Stock_Analysis_For_Quant](https://github.com/LastAncientOne/Stock_Analysis_For_Quant/tree/master/Python_Stock/Technical_Indicators)
by LastAncientOne.

## Disclaimer

*The material in this repository is for educational purposes only and should not be considered professional investment advice.*
↑