Skip to main content

Brownian

Python application

Brownianは日本株取引に対応した株取引フレームワークです。JQuantsからのデータダウンロード, 取引モデルの作成, バックテスト, 実取引まで網羅的にサポートします.

Usage

以下のサブコマンドを実行すると指定したディレクトリ以下にJQuantesから取得した情報をCSVで保存します.

brownian download <保存先のディレクトリ名>

ログイン情報の設定

またdownloadオプションには--usernameおよび--passwordオプションが用意されていて、実行時にこれらの引数を指定して実行することもできます。 これらの引数は.brownianrcの内容より優先して利用されます。

DBの更新・CSVの生成

以下のコマンドを実行すると, ダウンロードしたデータを集計してSQLiteデータベース上に格納します. またデータベースから銘柄毎の株価情報・決算情報を集計しCSVを生成します.

$ brownian download <保存先フォルダ名>
$ brownian generate <保存先フォルダ名>

ディレクトリの構成

raw_stock

JQuantsから取得した日毎の株価情報

raw_statements

JQuantsから取得した日毎の決算情報

stock

genereateコマンドで生成した銘柄毎の株価情報. 株価は調整済みの数字.

Install

各種コマンドのインストール前にvenvをactivateしてください.

python3 -m venv .venv
source .venv/bin/activate

For Developer

Prerequires

  • rye
  • gh

Set up

Run following commands.

rye sync

Utility commands.

  • To test.
rye run pytest
  • Lint and format
rye run invoke lint
rye run invoke format

Publish a release

Run the following command. This command increment the version number and make a release PR.

.bump_version.sh

test run

rye run brownian ...

Release files for brownian-stock 0.0.51

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

Source distribution (sdist)

Source distribution for brownian-stock 0.0.51
File Size Uploaded
brownian_stock-0.0.51.tar.gz 691.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for brownian-stock 0.0.51
File Interpreter ABI Platform
brownian_stock-0.0.51-py3-none-any.whl Python 3 none any Details

Total release size:775.1 kB

Release files / brownian_stock-0.0.51.tar.gz

Download URL brownian_stock-0.0.51.tar.gz
Size 691.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b14def03a44536bbb33eb1f111e6fecc0115348a2eff25864767ff4576d7e371
BLAKE2b-256 checksum
How to use checksums
9fbf5a8f9e89ffef2f5336a1af6b496c45dbaf18e1bcbf26923bef319a500a5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / brownian_stock-0.0.51-py3-none-any.whl

Download URL brownian_stock-0.0.51-py3-none-any.whl
Size 84.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97fe08d3b003eed206a757c7d669c40df0dbbe0d8bc47db75e427e39a499c553
BLAKE2b-256 checksum
How to use checksums
db6a55a52fac80642bc4e035ef1219ef4d804dc31aedd4ef281a00cdfe1e4a6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6
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