Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Analyzer ¶
Analyzer analyzes given quote and returns a result.
func CreateAnalyzer ¶
CreateAnalyzer returns an Analyzer for given string. DefaultAnalyzer just prints the result.
type AsanaAnalyzer ¶
type AsanaAnalyzer struct { }
AsanaAnalyzer analyses quotes and returns the result in copy paste friendly asana ticket format.
func (*AsanaAnalyzer) Analyze ¶
func (aa *AsanaAnalyzer) Analyze(quote Quote) (string, error)
Analyze analyzes quotes with following criteria: P/E Ratio -> if its blank it is not yet profitable. Above 0 -> Green check, otherwise not ok. Enterprise Value < Market Cap = More Cash than Debt -> If so green check, otherwise not ok. Return on Equity -> 20%+ is great, green check. Above 0 ok, below 0 not ok. Held by insiders -> 5 to 40% green check, otherwise not ok.
type Quote ¶
type Quote struct { PERatio float64 EnterpriseValue float64 MarketCap float64 ReturnOnEquity float64 InsiderOwnership float64 }
Quote is the mapped result of ScrapeResult, for calculation purposes.
type ScrapeResult ¶
type ScrapeResult struct { PERatio string EnterpriseValue string MarketCap string ReturnOnEquity string InsiderOwnership string }
ScrapeResult holds the result data from a scraping run.
type Scraper ¶
type Scraper interface {
Scrape(symbol string) (ScrapeResult, error)
}
Scraper scrapes a data source.
type YahooMapper ¶
type YahooMapper struct { }
YahooMapper maps ScrapeResult, if its source is also Yahoo finance, to a quote.
func (*YahooMapper) Map ¶
func (ym *YahooMapper) Map(result ScrapeResult) (Quote, error)
Map maps ScrapeResult to a quote.