Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompanyFolder ¶
type CompanyFolder interface {
// GetTicker gets the ticker of this company
Ticker() string
//AvailableFilings gets the list of dates of available filings
AvailableFilings(FilingType) []Date
// Filing gets a filing given a filing type and date of filing.
Filing(FilingType, Date) (Filing, error)
// SaveFolder persists the data from the company folder into a writer
// provided by the user. This stored info can be presented back to
// the fetcher (using CreateFolder API in fetcher) to recreate the
// company folder with already parsed data
SaveFolder(w io.Writer) error
Cik() string
// String is a dump routine to view the contents of the folder
String() string
}
Company interface used to get information and filing about a company
type Date ¶
Date defines an interface for filing date This is mainly to validate the date being passed into the package.
type Filing ¶
type Filing interface {
Ticker() string
FiledOn() string
Type() (FilingType, error)
Revenue() (float64, error)
CostOfRevenue() (float64, error)
GrossMargin() (float64, error)
OperatingIncome() (float64, error)
OperatingExpense() (float64, error)
NetIncome() (float64, error)
TotalEquity() (float64, error)
ShortTermDebt() (float64, error)
LongTermDebt() (float64, error)
CurrentLiabilities() (float64, error)
CurrentAssets() (float64, error)
DeferredRevenue() (float64, error)
RetainedEarnings() (float64, error)
OperatingCashFlow() (float64, error)
CapitalExpenditure() (float64, error)
Dividend() (float64, error)
Interest() (float64, error)
CollectedData() []string
}
Filing interface for fetching financial data
type FilingFetcher ¶
type FilingFetcher interface {
// GetFilings creates a folder for the company with a list of
// available filings. No financial data is pulled and the user
// of the interface can selectively pull financial data into the
// folder using the CompanyFolder interface
CompanyFolder(string, ...FilingType) (CompanyFolder, error)
// CreateFolder creates a company folder using a Reader
// User can provoder a store of edgar data previous stored
// by this package (using the Store function of the Company Folder)
// This function is used to avoid reparsing edgar data and reusing
// already parsed and stored information.
CreateFolder(io.Reader, ...FilingType) (CompanyFolder, error)
}
FilingFetcher fetches the filing requested
func NewFilingFetcher ¶
func NewFilingFetcher() FilingFetcher
type FilingType ¶
type FilingType string
var ( //Filing types FilingType10Q FilingType = "10-Q" FilingType10K FilingType = "10-K" )
Click to show internal directories.
Click to hide internal directories.