Documentation
¶
Index ¶
Constants ¶
View Source
const ( StockInfoType InfoType = "type" StockInfoSector = "sector" StockInfoIndustry = "industry" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Finder ¶
type Finder interface { FindAll() ([]*Stock, error) FindByID(ID uuid.UUID) (*Stock, error) FindBySymbol(symbol string) (*Stock, error) FindByName(name string) (*Stock, error) FindAllByExchanges(exchanges []string) ([]*Stock, error) FindAllByDividendAnnounceProjectYearAndMonth(year, month int) ([]*Stock, error) }
type Info ¶
func NewStockInfo ¶
NewStockInfo creates an stock info instance
type InfoFinder ¶
type InfoPersister ¶
type Price ¶
type Price struct { Date time.Time Close float64 High float64 Low float64 Open float64 Change float64 Volume int64 High52Week float64 Low52Week float64 EPS float64 PER float64 }
Price represents stock's price struct
type Price52WeekHighLow ¶
Price52WeekHighLow represents 52 week high -low stock's price struct
type PriceVolatility ¶
PriceVolatility represents stock's price volatility struct
type Stock ¶
type Stock struct { ID uuid.UUID Market *market.Market Exchange *exchange.Exchange Name string Symbol string Value mm.Value Dividends []dividend.StockDividend DividendYield float64 Change mm.Value LastPriceUpdate time.Time High52Week mm.Value Low52Week mm.Value HighLow52WeekUpdate time.Time Type *Info Sector *Info Industry *Info EPS float64 PER float64 Description string PriceVolatilityUpdate time.Time HV20Day float64 HV52Week float64 }
Stock represents stock struct
func NewStock ¶
func NewStock(market *market.Market, exchange *exchange.Exchange, name, symbol string, t, sector, industry *Info) *Stock
NewStock creates an stock instance
func NewStockFromSymbol ¶
NewStockFromSymbol creates an stock instance only with the symbol
func (*Stock) BuyUnder ¶
func (s *Stock) BuyUnder() mm.Value
BuyUnder Price proposal when is appropriate to buy the stock
func (*Stock) ComparePriceWithHighLow ¶
ComparePriceWithHighLow Compare price with stock high - low price and returns 1 - Price between 71% - 100% 0 - Price between 31% - 70% -1 - Price between 0% - 30%
Click to show internal directories.
Click to hide internal directories.