sirs

package
v4.1.23 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSecurityMasterMap

func BuildSecurityMasterMap(sirsFiles []string) (map[string]string, error)

BuildSecurityMasterMap loads the listed security files and returns a map of cusipid -> symbol pairs. The first element of the input slice should be a complete snapshot (sirs.refresh.YYYYMMDD), and the following entries updates for this file (sirs.YYYYMMDD).

func CollectSirsFiles

func CollectSirsFiles(basePath, currentDateStr string) ([]string, error)

CollectSirsFilesFor returns a list of security master files for a given date. File names start from last Friday (the latest complete snapshot) and includes all incremental updates till we reach the date encoded in the reorg filename.

Types

type SecurityMaster

type SecurityMaster struct {
	Symbol                        string
	Cusip                         string
	ProcessDate                   *date.Date
	DateAdded                     *date.Date
	IdentifierTransactionCode     string
	IdentifierTransactionDate     *date.Date
	ChangeIndicator               string
	AssetCategory                 string
	PreviousIdentifier            string
	PreviousIdentifierMarker      string
	PreviousIdentifierDate        *date.Date
	NextIdentifier                string
	NextIdentifierDate            *date.Date
	IssueDescription              string
	CountryOfIssuer               string
	SecurityType                  string
	CollateralOfIssuer            string
	SicCodeOfIssuer               string
	ExchangeCode                  string
	PrimaryTickerSymbol           string
	TickerSymbolExt               string
	CurrentPaymentFrequency       string
	TaxStatus                     string
	DtcEligibility                string
	NsccEligibility               string
	GicsClassificationIndicator   string
	IssuerClassificationIndicator string
	MarginSecurityCode            string
	IssuerTypeCode                string
	NasdaqTierCode                string
	ActiveFlag                    string
	TradingStatus                 string
	IssueStatus                   string
	OriginalIdentifier            string
	OriginalIdentifierMarker      string
	SharesOutstanding             int64
	SharesOutstandingMarker       string
	SharesOutstandingDate         *date.Date
	SharesOutstandingChangeFlag   string
	IndicatedDividendFootnote     string
	IndicatedDividendDate         *date.Date
	IndicatedDividend             string
	EtfIndicator                  string
	IndicatedDividendScale        string
	DepositoryIndicator           string
	VotingRightsIndicator         string
	ExchangeCode1                 string
	EffectiveDate1                *date.Date
	StatusCode1                   string
	Ticker1                       string
	ExchangeCode2                 string
	EffectiveDate2                *date.Date
	StatusCode2                   string
	Ticker2                       string
	ListingExchangeCode           string
	ListingExchangeDate           *date.Date
	ListingExchangeStatusCode     string
	ListingExchangeTicker         string
	Country                       string
	CountryOfIssuerIncorporation  string
	Exchange                      string
}

SecurityMaster is model for database column mapping.

func LoadSirsFile

func LoadSirsFile(fileName string) ([]*SecurityMaster, error)

LoadSirsFile loads a single Security info file.

func ParseFile

func ParseFile(r io.Reader) ([]*SecurityMaster, error)

Jump to

Keyboard shortcuts

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