Documentation ¶
Index ¶
Constants ¶
View Source
const MaxDaysUntilExpiration = 62
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Expiration ¶
type Expiration struct {
// contains filtered or unexported fields
}
Expiration holds details of all options for a specific stock and expiration date.
func NewExpiration ¶
func NewExpiration(expDate time.Time, strikes []float64) (e Expiration, err error)
func (Expiration) Date ¶
func (e Expiration) Date() time.Time
func (Expiration) ExpirationDateStr ¶
func (e Expiration) ExpirationDateStr() string
ExpirationDateStr returns the expiration date as "YYYY-MM-DD".
func (Expiration) Strikes ¶
func (e Expiration) Strikes() []Strike
func (Expiration) String ¶
func (e Expiration) String() (s string)
func (Expiration) ToGob ¶
func (e Expiration) ToGob() ExpirationGob
func (Expiration) Validate ¶
func (e Expiration) Validate() error
type ExpirationGob ¶
ExpirationGob is the type used to persist option expiration dates and strike prices.
func (ExpirationGob) ToExpiration ¶
func (eg ExpirationGob) ToExpiration() (Expiration, error)
type ExpirationWarning ¶
type ExpirationWarning string
ExpirationWarning indicates expiration dates which can be skipped without alerting the user.
func (ExpirationWarning) Error ¶
func (ew ExpirationWarning) Error() string
Click to show internal directories.
Click to hide internal directories.