Documentation ¶
Index ¶
- Constants
- type DividendEntry
- type DividendHist
- type DividendHistMap
- type Hist
- type HistEntry
- type HistMap
- type Quote
- func (q *Quote) DivPayoutRatio() float64
- func (q *Quote) GetPrice() float64
- func (q *Quote) IsIncreasing() bool
- func (q *Quote) JSON() string
- func (q *Quote) SharesToBuy(txCost, desiredTxCostPerc float64) float64
- func (q *Quote) VariationValue() float64
- func (q *Quote) VariationValuePercent() float64
- func (q *Quote) WouldBuyOrSell() interface{}
- type Quotes
Constants ¶
View Source
const (
ErrTplNotSupported = "source '%s' does not support action '%s'"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DividendEntry ¶
type DividendEntry struct { Date utils.YearMonthDay Dividends float64 `json:",string"` }
type DividendHist ¶
type DividendHist struct { Symbol string Dividends []DividendEntry }
type DividendHistMap ¶
type DividendHistMap map[string]*DividendHist
type Hist ¶
func (*Hist) MovingAverage ¶
type Quote ¶
type Quote struct { Symbol string /* e.g.: VEUR.AS, Vanguard dev. europe on Amsterdam */ Name string Exchange string /* last actualization of the results */ Updated time.Time /* volume */ Volume int64 /* outstanding shares */ AvgDailyVolume int64 /* avg amount of shares traded */ /* dividend & related */ PeRatio float64 /* Price / EPS */ DividendYield float64 /* annual div. per share / price per share */ DividendExDate time.Time /* last dividend payout date */ /* price & derived */ Bid, Ask float64 Open, PreviousClose float64 LastTradePrice float64 Change, ChangePercent float64 DayLow, DayHigh float64 YearLow, YearHigh float64 Ma50, Ma200 float64 /* 200- and 50-day moving average */ }
func (*Quote) DivPayoutRatio ¶
will try to calculate the dividend payout ratio, if possible, * otherwise returns 0
func (*Quote) IsIncreasing ¶
True if the Quote is increasing False otherwise
func (*Quote) SharesToBuy ¶
SharesToBuy gives you the number of shares to buy if you want
- the transaction cost to be less than a certain percentage
func (*Quote) VariationValue ¶
func (*Quote) VariationValuePercent ¶
func (*Quote) WouldBuyOrSell ¶
func (q *Quote) WouldBuyOrSell() interface{}
Click to show internal directories.
Click to hide internal directories.