Analyze stock
Project description
kabutobashi
concept
class-relationship.
graph TD;
subgraph Aggregates
aggregate[StockCodeSingleAggregate]
aggregate --- recordset_single
aggregate --- |Method| processed
aggregate --- |Analysis| estimated
subgraph ValueObject
recordset_single[StockRecordset/single]
processed[StockDataProcessed]
estimated[StockDataEstimated]
end
end
subgraph Entities
recordset[StockRecordset/multiple]
brand[StockBrand]
record[StockRecord]
recordset --> brand
recordset --> record
recordset ---> aggregate
end
subgraph Repositories
web[[Web]] --- | crawl | recordset
repositories[(Storage/Database)] --- | read/write | recordset
repositories --- | read/write | aggregate
end
usage
import kabutobashi as kb
records = kb.example()
methods = kb.methods + [kb.basic, kb.pct_change, kb.volatility]
analysis = kb.stock_analysis
for df in records.to_code_iterable():
agg = kb.StockCodeSingleAggregate.of(entity=df).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
Release history Release notifications | RSS feed
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.5.2.tar.gz
(32.7 kB
view hashes)
Built Distribution
Close
Hashes for kabutobashi-0.5.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f15ea19876170e087857b7ac0e9591f65045defe9c93987d4639d07b63c17d6 |
|
MD5 | 3187e71877ab2b1c00c783dc101133fa |
|
BLAKE2b-256 | 838075a497e48a2dc83cdebac2e06774b257e1d54ec6112e87a541e1188dc2e1 |