GLOBALS.md
March 1, 2019 · View on GitHub
Classes
LibraryError
Kind: global class
Author: Torrey Leonard https://github.com/Ladinn
new LibraryError(message)
| Param |
|---|
| message |
libraryError.toString() ⇒ string
Kind: instance method of LibraryError
Author: Torrey Leonard https://github.com/Ladinn
OptionsChain
Kind: global class
Author: Torrey Leonard https://github.com/Ladinn
- OptionsChain
- new OptionsChain(array)
- .getExpirationDates() ⇒
Array.<Date> - .getStrikePrices(date, side) ⇒
Array.<Number>|Error - .getByExpirationDate(date) ⇒
Object - .getNearestStrikePrice(date, side, priceTarget) ⇒
Number|Error - .getNearestExpirationDate(targetDate) ⇒
Date - .getVolume(date, strike, side) ⇒
Number - .getOpenInterest(date, strike, side) ⇒
Number - .getLastPrice(date, strike, side) ⇒
Number - .getBid(date, strike, side) ⇒
Number - .getAsk(date, strike, side) ⇒
Number - .getChange(date, strike, side) ⇒
Number - .getLastTradeDate(date, strike, side) ⇒
Date - .getImpliedVolatility(date, strike, side) ⇒
Number - .isInTheMoney(date, strike, side) ⇒
Boolean
new OptionsChain(array)
Creates a new OptionsChain object.
| Param | Type |
|---|---|
| array | Array |
optionsChain.getExpirationDates() ⇒ Array.<Date>
Returns an array of all expiration dates for the OptionsChain object.
Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn
optionsChain.getStrikePrices(date, side) ⇒ Array.<Number> | Error
Returns an array of all strike prices for the OptionsChain object.
Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn
| Param | Type | Description |
|---|---|---|
| date | Date | |
| side | String | put, call |
optionsChain.getByExpirationDate(date) ⇒ Object
Returns an options chain for the given date.
Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn
| Param | Type |
|---|---|
| date | Date |
optionsChain.getNearestStrikePrice(date, side, priceTarget) ⇒ Number | Error
Returns the nearest strike price to the given price target.
Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn
| Param | Type | Description |
|---|---|---|
| date | Date | Expiration date to query. |
| side | String | Strike price to query. |
| priceTarget | Number |
optionsChain.getNearestExpirationDate(targetDate) ⇒ Date
Returns the nearest expiration date to the given date.
Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn
| Param | Type |
|---|---|
| targetDate | Date |
optionsChain.getVolume(date, strike, side) ⇒ Number
Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn
| Param | Type | Description |
|---|---|---|
| date | Date | Expiration date to query. |
| strike | Number | Strike price to query. |
| side | String | put, call |
optionsChain.getOpenInterest(date, strike, side) ⇒ Number
Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn
| Param | Type | Description |
|---|---|---|
| date | Date | Expiration date to query. |
| strike | Number | Strike price to query |
| side | String | put, call |
optionsChain.getLastPrice(date, strike, side) ⇒ Number
Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn
| Param | Type | Description |
|---|---|---|
| date | Date | Expiration date to query. |
| strike | Number | Strike price to query |
| side | String | put, call |
optionsChain.getBid(date, strike, side) ⇒ Number
Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn
| Param | Type | Description |
|---|---|---|
| date | Date | Expiration date to query. |
| strike | Number | Strike price to query |
| side | String | put, call |
optionsChain.getAsk(date, strike, side) ⇒ Number
Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn
| Param | Type | Description |
|---|---|---|
| date | Date | Expiration date to query. |
| strike | Number | Strike price to query |
| side | String | put, call |
optionsChain.getChange(date, strike, side) ⇒ Number
Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn
| Param | Type | Description |
|---|---|---|
| date | Date | Expiration date to query. |
| strike | Number | Strike price to query |
| side | String | put, call |
optionsChain.getLastTradeDate(date, strike, side) ⇒ Date
Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn
| Param | Type | Description |
|---|---|---|
| date | Date | Expiration date to query. |
| strike | Number | Strike price to query |
| side | String | put, call |
optionsChain.getImpliedVolatility(date, strike, side) ⇒ Number
Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn
| Param | Type | Description |
|---|---|---|
| date | Date | Expiration date to query. |
| strike | Number | Strike price to query |
| side | String | put, call |
optionsChain.isInTheMoney(date, strike, side) ⇒ Boolean
Kind: instance method of OptionsChain
Author: Torrey Leonard https://github.com/Ladinn
| Param | Type | Description |
|---|---|---|
| date | Date | Expiration date to query. |
| strike | Number | Strike price to query |
| side | String | put, call |
Quote
Kind: global class
Author: Torrey Leonard https://github.com/Ladinn
Properties
| Name | Type | Description |
|---|---|---|
| symbol | String | |
| date | Date | |
| source | String | |
| price | Object | |
| price.last | Number | |
| price.open | Number | |
| price.high | Number | |
| price.low | Number | |
| price.close | Number | |
| price.volume | Number | |
| price.adjustedClose | Number | |
| dom | Object | |
| dom.bid.price | Number | |
| dom.bid.size | Number | |
| dom.ask.price | Number | |
| dom.ask.size | Number | |
| meta | Object | Price changes, dividends, splits, market cap, etc. |
| original | String | Original JSON string |
- Quote
- new Quote(object)
- instance
- .getSymbol() ⇒
String - .getDate() ⇒
Date - .getSource() ⇒
String - .getLast() ⇒
Number|Null - .getOpen() ⇒
Number|Null - .getHigh() ⇒
Number|Null - .getLow() ⇒
Number|Null - .getClose() ⇒
Number|Null - .getOHLC4() ⇒
number - .getVolume() ⇒
Number|Null - .getAdjustedClose() ⇒
Number|Null - .getBidPrice() ⇒
Number|Null - .getBidSize() ⇒
Number|Null - .getAskPrice() ⇒
Number|Null - .getAskSize() ⇒
Number|Null - .getMeta() ⇒
Object|Null - .getOriginal() ⇒
String
- .getSymbol() ⇒
- static
- .getVWAP(quoteArray) ⇒
Number - .priceChannel(quoteArray, period) ⇒
Object
- .getVWAP(quoteArray) ⇒
new Quote(object)
Creates a new Quote instance.
| Param | Type |
|---|---|
| object | Object |
quote.getSymbol() ⇒ String
Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn
quote.getDate() ⇒ Date
Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn
quote.getSource() ⇒ String
Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn
quote.getLast() ⇒ Number | Null
Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn
quote.getOpen() ⇒ Number | Null
Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn
quote.getHigh() ⇒ Number | Null
Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn
quote.getLow() ⇒ Number | Null
Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn
quote.getClose() ⇒ Number | Null
Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn
quote.getOHLC4() ⇒ number
Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn
quote.getVolume() ⇒ Number | Null
Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn
quote.getAdjustedClose() ⇒ Number | Null
Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn
quote.getBidPrice() ⇒ Number | Null
Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn
quote.getBidSize() ⇒ Number | Null
Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn
quote.getAskPrice() ⇒ Number | Null
Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn
quote.getAskSize() ⇒ Number | Null
Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn
quote.getMeta() ⇒ Object | Null
Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn
quote.getOriginal() ⇒ String
Kind: instance method of Quote
Author: Torrey Leonard https://github.com/Ladinn
Quote.getVWAP(quoteArray) ⇒ Number
Returns the volume weighted average price (VWAP) for the given quote array. https://www.investopedia.com/terms/v/vwap.asp
Kind: static method of Quote
Author: Torrey Leonard https://github.com/Ladinn
| Param | Type |
|---|---|
| quoteArray | Array |
Quote.priceChannel(quoteArray, period) ⇒ Object
Calculates the highest high and lowest low for the provided period of time.
Kind: static method of Quote
Author: Torrey Leonard https://github.com/Ladinn
| Param | Type |
|---|---|
| quoteArray | Array |
| period | int |