finance

package
v0.0.0-...-0298df9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2016 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BalanceSheet

type BalanceSheet struct {
	Symbol string
	Date   time.Time

	NetLoans           float64
	Deposits           float64
	CurrentAssets      float64
	NonCurrentAssets   float64
	TotalAssets        float64
	CurrentLiabilities float64
	TotalLiabilities   float64
}

BalanceSheet represents a summarized information for a balance sheet

type CashFlow

type CashFlow struct {
	Symbol string
	Date   time.Time

	CashFromOperations  float64
	CashFromInvesting   float64
	CashFromFinancing   float64
	CapitalExpenditures float64
	FreeCashFlow        float64
}

CashFlow represents a summarized information for a cash flow statement

type DividendEntry

type DividendEntry struct {
	Symbol string
	Date   time.Time
	Value  float64
}

DividendEntry represents a historican entry of a dividend

type Financials

type Financials struct {
	Symbol string
	Date   time.Time

	Income   IncomeStatement
	Balance  BalanceSheet
	CashFlow CashFlow
}

Financials represents financials for a symbol

type IncomeStatement

type IncomeStatement struct {
	Symbol string
	Date   time.Time

	Revenue              float64
	OperatingIncome      float64
	NetIncome            float64
	NetInterestIncome    float64
	EarningsPerShare     float64
	DilutedAverageShares float64
}

IncomeStatement represents a short information about the income

type Provider

type Provider interface {
	GetQuotes(symbols ...string) ([]Quote, error)
	GetDividendHistory(symbol string) ([]DividendEntry, error)
	GetFinancials(symbol string) ([]Financials, error)
}

Provider interface allows to query for a particular quote

type Quote

type Quote struct {
	Symbol   string
	Name     string
	Exchange string
	Updated  time.Time

	// volume
	Volume         int64 // outstanding shares
	AvgDailyVolume int64 // avg amount of shares traded

	// dividend & related
	PeRatio          float64         // Price / EPS
	EarningsPerShare float64         // (net income - spec.dividends) / avg.  outstanding shares
	DividendPerShare float64         // total (non-special) dividend payout / total amount of shares
	DividendYield    float64         // annual div. per share / price per share
	DividendExDate   time.Time       // last dividend payout date
	DividendHistory  []DividendEntry // the history of dividend payout

	// price & derived
	Bid, Ask            float64
	Open, PreviousClose float64
	LastTradePrice      float64
	Change              float64
	DayLow, DayHigh     float64
	YearLow, YearHigh   float64
	Ma50, Ma200         float64 // 200- and 50-day moving average
	Financials          []Financials

	// indicators
	Profitability     string
	Growth            string
	DividendFrequency int
}

Quote represents a single quote for a particular stock symbol

func (*Quote) GetFFOGrowth

func (q *Quote) GetFFOGrowth() float64

GetFFOGrowth gets the average cash from operations growth

func (*Quote) GetGrowth

func (q *Quote) GetGrowth() string

GetGrowth estimates the growth rating (A-F)

func (*Quote) GetLastYearDividendFrequency

func (q *Quote) GetLastYearDividendFrequency() int

GetLastYearDividendFrequency computes the dividend frequency of the past year, returns how many dividend payments were made during that year.

func (*Quote) GetProfitability

func (q *Quote) GetProfitability() string

GetProfitability estimates the profitability rating (A-F)

func (*Quote) GetRevenueGrowth

func (q *Quote) GetRevenueGrowth() float64

GetRevenueGrowth gets the average revenue growth

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL