📦 SQA::SectorAnalyzer¶
🔨 Instance Methods¶
#blackboards()¶
Returns the value of attribute blackboards.
Source Location
#stocks_by_sector()¶
Returns the value of attribute stocks_by_sector.
Source Location
#initialize(db_dir: = '/tmp/sqa_sectors')¶
Returns
Type: SectorAnalyzer
a new instance of SectorAnalyzer
Source Location
#add_stock(stock, sector:)¶
Add a stock to sector analysis
Parameters
| Name | Type | Description |
|---|---|---|
stock |
SQA::Stock, String |
Stock object or ticker |
sector |
Symbol |
Sector classification |
Source Location
#discover_sector_patterns(sector, stocks, **options)¶
Discover patterns for an entire sector
Parameters
| Name | Type | Description |
|---|---|---|
sector |
Symbol |
Sector to analyze |
stocks |
Array<SQA::Stock> |
Stock objects to analyze |
options |
Hash |
Pattern discovery options |
Returns
Type: Array<Hash>
Sector-wide patterns
Source Location
#detect_sector_regime(sector, stocks)¶
Detect sector regime
Parameters
| Name | Type | Description |
|---|---|---|
sector |
Symbol |
Sector to analyze |
stocks |
Array<SQA::Stock> |
Stock objects |
Returns
Type: Hash
Sector regime information
Source Location
#query_sector(sector, fact_type, pattern = {})¶
Query sector blackboard
Parameters
| Name | Type | Description |
|---|---|---|
sector |
Symbol |
Sector to query |
fact_type |
Symbol |
Type of fact to query |
pattern |
Hash |
Pattern to match |
Returns
Type: Array<KBS::Fact>
Matching facts
Source Location
#print_sector_summary(sector)¶
Print sector summary
Parameters
| Name | Type | Description |
|---|---|---|
sector |
Symbol |
Sector to summarize |
Source Location
📝 Attributes¶
👁️ blackboards read-only¶
Returns the value of attribute blackboards.
👁️ stocks_by_sector read-only¶
Returns the value of attribute stocks_by_sector.