Skip to main content

Analyze stock

Project description

kabutobashi

pytest codecov Code style: black Imports: isort Checked with mypy

PythonVersion PiPY Documentation Status

concept

class-relationship.

  • E: Entity
  • VO: ValueObject
  • S: Service
  • A: Aggregate
graph TD;
  
  subgraph Stock
    stock[Stock:E]
    brand[StockBrand:E]
    record[StockRecord:E]
    indicator[StockIndicator:E]
    
    stock --> brand
    stock --> record
    stock --> indicator
  end

  subgraph Stock-to-Analysis
    aggregate[StockCodeSingleAggregate:A]
    processed[StockDataProcessed:VO]
    estimated[StockDataEstimated:VO]
    
    aggregate --- |Info| stock
    aggregate --- |Method| processed
    aggregate --- |Analysis| estimated
  end

  subgraph Repositories/Storage
    repositories[(Storage/Database)] --- | read/write | stock
  end

  subgraph Pages
    raw_html[RawHtml:VO]
    decoder[Decoder:S]
    decoded_html[DecodedHtml:VO]

    raw_html --> decoder
    decoder --> decoded_html
    decoded_html --> repositories
  end

  subgraph Repositories/Web
    web[[Web]] --> | crawl | raw_html
  end

usage

import kabutobashi as kb

df = kb.example()
methods = kb.methods + [kb.basic, kb.pct_change, kb.volatility]
analysis = kb.stock_analysis
agg = kb.StockCodeSingleAggregate.of(entity=df, code="1234").with_processed(methods).with_estimated(stock_analysis=analysis)
print(agg)

# n日前までの営業日の日付リストを取得する関数
target_date = "2020-01-01"
date_list = kb.get_past_n_days(target_date, n=40)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kabutobashi-0.6.0.tar.gz (32.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kabutobashi-0.6.0-py3-none-any.whl (47.4 kB view details)

Uploaded Python 3

File details

Details for the file kabutobashi-0.6.0.tar.gz.

File metadata

  • Download URL: kabutobashi-0.6.0.tar.gz
  • Upload date:
  • Size: 32.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for kabutobashi-0.6.0.tar.gz
Algorithm Hash digest
SHA256 8c25b18af2f6cd9f3ad4091643056b8cee00dd7964f58b08067f1f02f1a19d41
MD5 6b98660f936b933d889ae44ea8ae5596
BLAKE2b-256 7cd5eebefdc1bedde3f447a0a047add462e519dce12e415d3d787f8d0c9ca336

See more details on using hashes here.

File details

Details for the file kabutobashi-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: kabutobashi-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 47.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for kabutobashi-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aecff5ba6f1f7065c57a491c6608db7266791b59e061d8ddcd42c99d807ebe31
MD5 369df3fbc571c3d23f447fd557bcb705
BLAKE2b-256 e3ec38660d38599b2bad3919a799c156d5f909d4d2df30e3c0ccfd15664d67fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page