Skip to content

Commit

Permalink
docs: Update docs for v1.0.0 (#273)
Browse files Browse the repository at this point in the history
+semver: major
  • Loading branch information
LeeDongGeon1996 authored Oct 17, 2022
1 parent ae96643 commit 6d69b11
Show file tree
Hide file tree
Showing 47 changed files with 228 additions and 212 deletions.
8 changes: 4 additions & 4 deletions docs/GemFile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ GEM
eventmachine (1.2.7)
eventmachine (1.2.7-x64-mingw32)
execjs (2.8.1)
faraday (2.5.2)
faraday (2.6.0)
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.0)
faraday-net_http (3.0.1)
ffi (1.15.5)
ffi (1.15.5-x64-mingw32)
forwardable-extended (2.6.0)
Expand Down Expand Up @@ -85,7 +85,7 @@ GEM
octokit (~> 4.0)
public_suffix (>= 3.0, < 5.0)
typhoeus (~> 1.3)
html-pipeline (2.14.2)
html-pipeline (2.14.3)
activesupport (>= 2)
nokogiri (>= 1.4)
html-proofer (3.19.4)
Expand Down Expand Up @@ -289,4 +289,4 @@ DEPENDENCIES
wdm (>= 0.1.1)

BUNDLED WITH
2.2.31
2.3.22
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ It can be used in any market analysis software using standard OHLCV price quotes

Explore more information:

- [Indicators and overlays]({{site.baseurl}}/indicators/#content)
- [Guide and Pro tips]({{site.baseurl}}/guide/#content)
- [Indicators and overlays]({{site.baseurl}}/indicators/#content)
- [Utilities and Helpers]({{site.baseurl}}/utilities/#content)
- [Demo site](https://stock-charts.azurewebsites.net) (a stock chart)
- [Release notes]({{site.github.repository_url}}/releases)
Expand Down
4 changes: 2 additions & 2 deletions docs/_indicators/Adl.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ ADLResults[ADLResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `money_flow_multiplier` | float | Money Flow Multiplier
| `money_flow_volume` | float | Money Flow Volume
| `money_flow_multiplier` | float, Optional | Money Flow Multiplier
| `money_flow_volume` | float, Optional | Money Flow Volume
| `adl` | float | Accumulation Distribution Line (ADL)
| `adl_sma` | float, Optional | Moving average (SMA) of ADL based on `sma_periods` periods, if specified

Expand Down
7 changes: 4 additions & 3 deletions docs/_indicators/Adx.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ ADXResults[ADXResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `pdi` | float, Optional | Plus Directional Index (+DI) for `N` lookback periods
| `mdi` | float, Optional | Minus Directional Index (-DI) for `N` lookback periods
| `adx` | float, Optional | Average Directional Index (ADX) for `N` lookback periods
| `pdi` | float, Optional | Plus Directional Index (+DI)
| `mdi` | float, Optional | Minus Directional Index (-DI)
| `adx` | float, Optional | Average Directional Index (ADX)
| `adxr` | float, Optional | Average Directional Index Rating (ADXR)

### Utilities

Expand Down
6 changes: 3 additions & 3 deletions docs/_indicators/Alligator.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ AlligatorResults[AlligatorResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `jaw` | Decimal, Optional | Alligator's Jaw
| `teeth` | Decimal, Optional | Alligator's Teeth
| `lips` | Decimal, Optional | Alligator's Lips
| `jaw` | float, Optional | Alligator's Jaw
| `teeth` | float, Optional | Alligator's Teeth
| `lips` | float, Optional | Alligator's Lips

### Utilities

Expand Down
2 changes: 1 addition & 1 deletion docs/_indicators/Alma.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ALMAResults[ALMAResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `alma` | Decimal, Optional | Arnaud Legoux Moving Average
| `alma` | float, Optional | Arnaud Legoux Moving Average

### Utilities

Expand Down
15 changes: 3 additions & 12 deletions docs/_indicators/Aroon.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@ layout: indicator
| `quotes` | Iterable[Quote] | Iterable(such as list or an object having `__iter__()`) of the [Quote class]({{site.baseurl}}/guide/#historical-quotes) or [its sub-class]({{site.baseurl}}/guide/#using-custom-quote-classes). <br><span class='qna-dataframe'> • [Got in trouble with Pandas.dataframe?]({{site.baseurl}}/guide/#using-pandasdataframe) </span>
| `lookback_periods` | int, *default 25* | Number of periods (`N`) for the lookback evaluation. Must be greater than 0.

<!--
## Usage
```python
from stock_indicators import indicators
results = indicators.get_aroon(quotes, lookback_periods)
``` -->


### Historical quotes requirements

You must have at least `N` periods of `quotes` to cover the warmup periods.
Expand All @@ -49,9 +40,9 @@ AroonResults[AroonResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `aroon_up` | Decimal, Optional | Based on last High price
| `aroon_down` | Decimal, Optional | Based on last Low price
| `oscillator` | Decimal, Optional | AroonUp - AroonDown
| `aroon_up` | float, Optional | Based on last High price
| `aroon_down` | float, Optional | Based on last Low price
| `oscillator` | float, Optional | AroonUp - AroonDown

### Utilities

Expand Down
6 changes: 3 additions & 3 deletions docs/_indicators/Atr.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ ATRResults[ATRResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `tr` | Decimal, Optional | True Range for current period
| `atr` | Decimal, Optional | Average True Range for `N` lookback periods
| `atrp` | Decimal, Optional | Average True Range Percent is `(atr/Close Price)*100`. This normalizes so it can be compared to other stocks.
| `tr` | float, Optional | True Range for current period
| `atr` | float, Optional | Average True Range
| `atrp` | float, Optional | Average True Range Percent is `(atr/Close Price)*100`. This normalizes so it can be compared to other stocks.

### Utilities

Expand Down
8 changes: 5 additions & 3 deletions docs/_indicators/Beta.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ layout: indicator
# {{ page.title }}
<hr>

## **get_beta**(*market_history, eval_history, lookback_periods, beta_type=BetaType.STANDARD*)
## **get_beta**(*eval_history, market_quotes, lookback_periods, beta_type=BetaType.STANDARD*)

:warning: <code style='color: #d32f2f; important'>Eval and Market quotes have been reversed in v1! Ensure you swap parameter location. (The warning will be shown and it will be removed after v1.0.0')</code>

## Parameters

| name | type | notes
| -- |-- |--
| `market_history` | Iterable[Quote] | Historical [market] Quotes data should be at any consistent frequency (day, hour, minute, etc). This `market` quotes will be used to establish the baseline. <br><span class='qna-dataframe'> • [Got in trouble with Pandas.dataframe?]({{site.baseurl}}/guide/#using-pandasdataframe) </span>
| `eval_history` | Iterable[Quote] | Historical [evaluation stock] Quotes data should be at any consistent frequency (day, hour, minute, etc).
| `eval_history` | Iterable[Quote] | Historical [evaluation stock] Quotes data should be at any consistent frequency (day, hour, minute, etc). <br><span class='qna-dataframe'> • [Got in trouble with Pandas.dataframe?]({{site.baseurl}}/guide/#using-pandasdataframe) </span>
| `market_history` | Iterable[Quote] | Historical [market] Quotes data should be at any consistent frequency (day, hour, minute, etc). This `market` quotes will be used to establish the baseline.
| `lookback_periods` | int | Number of periods (`N`) in the lookback period. Must be greater than 0 to calculate; however we suggest a larger period for statistically appropriate sample size and especially when using Beta +/-.
| `beta_type` | BetaType, *default BetaType.STANDARD* | Type of Beta to calculate. See [BetaType options](#betatype-options) below.

Expand Down
6 changes: 3 additions & 3 deletions docs/_indicators/BollingerBands.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ BollingerBandsResults[BollingerBandsResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `sma` | Decimal, Optional | Simple moving average (SMA) of Close price (center line)
| `upper_band` | Decimal, Optional | Upper line is `D` standard deviations above the SMA
| `lower_band` | Decimal, Optional | Lower line is `D` standard deviations below the SMA
| `sma` | float, Optional | Simple moving average (SMA) of Close price (center line)
| `upper_band` | float, Optional | Upper line is `D` standard deviations above the SMA
| `lower_band` | float, Optional | Lower line is `D` standard deviations below the SMA
| `percent_b` | float, Optional | `%B` is the location within the bands. `(Price-lower_band)/(upper_band-lower_band)`
| `z_score` | float, Optional | Z-Score of current Close price (number of standard deviations from mean)
| `width` | float, Optional | Width as percent of SMA price. `(upper_band-lower_band)/sma`
Expand Down
2 changes: 1 addition & 1 deletion docs/_indicators/Cci.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ CCIResults[CCIResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `cci` | float, Optional | CCI value for `N` lookback periods
| `cci` | float, Optional | Commodity Channel Index

### Utilities

Expand Down
6 changes: 3 additions & 3 deletions docs/_indicators/ChaikinOsc.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ ChaikinOscResults[ChaikinOscResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `money_flow_multiplier` | float | Money Flow Multiplier
| `money_flow_volume` | float | Money Flow Volume
| `adl` | float | Accumulation Distribution Line (ADL)
| `money_flow_multiplier` | float, Optional | Money Flow Multiplier
| `money_flow_volume` | float, Optional | Money Flow Volume
| `adl` | float, Optional | Accumulation Distribution Line (ADL)
| `oscillator` | float, Optional | Chaikin Oscillator

:warning: **Warning**: absolute values in MFV, ADL, and Oscillator are somewhat meaningless, so use with caution.
Expand Down
2 changes: 1 addition & 1 deletion docs/_indicators/Chandelier.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ChandelierResults[ChandelierResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `chandelier_exit` | Decimal, Optional | Exit line
| `chandelier_exit` | float, Optional | Exit line

### Utilities

Expand Down
6 changes: 3 additions & 3 deletions docs/_indicators/Cmf.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ CMFResults[CMFResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `money_flow_multiplier` | float | Money Flow Multiplier
| `money_flow_volume` | float | Money Flow Volume
| `cmf` | float, Optional | Chaikin Money Flow = SMA of MFV for `N` lookback periods
| `money_flow_multiplier` | float, Optional | Money Flow Multiplier
| `money_flow_volume` | float, Optional | Money Flow Volume
| `cmf` | float, Optional | Chaikin Money Flow = SMA of MFV

:warning: **Warning**: absolute values in MFV and CMF are somewhat meaningless, so use with caution.

Expand Down
2 changes: 1 addition & 1 deletion docs/_indicators/Dema.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ DEMAResults[DEMAResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `dema` | Decimal, Optional | Double exponential moving average
| `dema` | float, Optional | Double exponential moving average

### Utilities

Expand Down
4 changes: 2 additions & 2 deletions docs/_indicators/Dpo.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ DPOResults[DPOResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `sma` | Decimal, Optional | Simple moving average offset by `N/2+1` periods
| `dpo` | Decimal, Optional | Detrended Price Oscillator (DPO)
| `sma` | float, Optional | Simple moving average offset by `N/2+1` periods
| `dpo` | float, Optional | Detrended Price Oscillator (DPO)

### Utilities

Expand Down
6 changes: 3 additions & 3 deletions docs/_indicators/ElderRay.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ ElderRayResults[ElderRayResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `ema` | Decimal, Optional | Exponential moving average of Close price
| `bull_power` | Decimal, Optional | Bull Power
| `bear_power` | Decimal, Optional | Bear Power
| `ema` | float, Optional | Exponential moving average of Close price
| `bull_power` | float, Optional | Bull Power
| `bear_power` | float, Optional | Bear Power

### Utilities

Expand Down
2 changes: 1 addition & 1 deletion docs/_indicators/Ema.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ EMAResults[EMAResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `ema` | Decimal, Optional | Exponential moving average
| `ema` | float, Optional | Exponential moving average

### Utilities

Expand Down
2 changes: 1 addition & 1 deletion docs/_indicators/Epma.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ EPMAResults[EPMAResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `epma` | Decimal, Optional | Endpoint moving average
| `epma` | float, Optional | Endpoint moving average

### Utilities

Expand Down
18 changes: 12 additions & 6 deletions docs/_indicators/Fractal.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@ layout: indicator
# {{ page.title }}
<hr>

## **get_fractal**(*quotes, window_span=2*)
## **get_fractal**(*quotes, window_span=2, end_type = EndType.HIGH_LOW*)

### More overloaded interfaces
**get_fractal**(quotes, left_span, right_span, end_type)

## Parameters

| name | type | notes
| -- |-- |--
| `quotes` | Iterable[Quote] | Iterable(such as list or an object having `__iter__()`) of the [Quote class]({{site.baseurl}}/guide/#historical-quotes) or [its sub-class]({{site.baseurl}}/guide/#using-custom-quote-classes). <br><span class='qna-dataframe'> • [Got in trouble with Pandas.dataframe?]({{site.baseurl}}/guide/#using-pandasdataframe) </span>
| `window_span` | int, *default 2* | Evaluation window span width (`S`). Must be at least 2.

<!-- | `endType` | EndType | Determines whether `Close` or `High/Low` are used to find end points. See [EndType options](#endtype-options) below. Default is `EndType.HighLow`. -->
| `end_type` | EndType | Determines whether `close` or `high/low` are used to find end points. See [EndType options](#endtype-options) below. Default is `EndType.HIGH_LOW`.

The total evaluation window size is `2×S+1`, representing `±S` from the evalution date.

Expand All @@ -27,12 +29,16 @@ You must have at least `2×S+1` periods of `quotes` to cover the warmup periods;

`quotes` is an `Iterable[Quote]` collection of historical price quotes. It should have a consistent frequency (day, hour, minute, etc). See [the Guide]({{site.baseurl}}/guide/#historical-quotes) for more information.

<!-- ### EndType options
### EndType options

```python
from stock_indicators.indicators.common.enums import EndType
```

| type | description
|-- |--
| `EndType.Close` | Chevron point identified from `Close` price
| `EndType.HighLow` | Chevron point identified from `High` and `Low` price (default) -->
| `CLOSE` | Chevron point identified from `close` price
| `HIGH_LOW` | Chevron point identified from `high` and `low` price (default)

## Returns

Expand Down
2 changes: 1 addition & 1 deletion docs/_indicators/Hma.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ HMAResults[HMAResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `hma` | Decimal, Optional | Hull moving average for `N` lookback periods
| `hma` | float, Optional | Hull moving average

### Utilities

Expand Down
4 changes: 2 additions & 2 deletions docs/_indicators/HtTrendline.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ HTTrendlineResults[HTTrendlineResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `trendline` | Decimal, Optional | HT Trendline
| `smooth_price` | Decimal, Optional | Weighted moving average of `(H+L)/2` price
| `trendline` | float, Optional | HT Trendline
| `smooth_price` | float, Optional | Weighted moving average of `(H+L)/2` price

### Utilities

Expand Down
14 changes: 9 additions & 5 deletions docs/_indicators/Ichimoku.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ layout: indicator

## **get_ichimoku**(*quotes, tenkan_periods=9, kijun_periods=26, senkou_b_periods=52*)

### More overloaded interfaces
**get_ichimoku**(quotes, tenkan_periods, kijun_periods, senkou_b_periods,
offset_periods)
**get_ichimoku**(quotes, tenkan_periods, kijun_periods, senkou_b_periods,
senkou_offset, chikou_offset)

## Parameters

| name | type | notes
Expand All @@ -19,11 +25,9 @@ layout: indicator
| `tenkan_periods` | int, *default 9* | Number of periods (`T`) in the Tenkan-sen midpoint evaluation. Must be greater than 0.
| `kijun_periods` | int, *default 26* | Number of periods (`K`) in the shorter Kijun-sen midpoint evaluation. Must be greater than 0.
| `senkou_b_periods` | int, *default 52* | Number of periods (`S`) in the longer Senkou leading span B midpoint evaluation. Must be greater than `K`.

<!--
| `offsetPeriods` | int | Optional. Number of periods to offset both `Senkou` and `Chikou` spans. Must be non-negative. Default is `kijunPeriods`.
| `senkouOffset` | int | Optional. Number of periods to offset the `Senkou` span. Must be non-negative. Default is `kijunPeriods`.
| `chikouOffset` | int | Optional. Number of periods to offset the `Chikou` span. Must be non-negative. Default is `kijunPeriods`. -->
| `offset_periods` | int | Number of periods to offset both `Senkou` and `Chikou` spans. Must be non-negative. Default is `kijun_periods`.
| `senkou_offset` | int | Number of periods to offset the `Senkou` span. Must be non-negative. Default is `kijun_periods`.
| `chikou_offset` | int | Number of periods to offset the `Chikou` span. Must be non-negative. Default is `kijun_periods`.

See overloads usage above to determine which parameters are relevant for each. If you are customizing offsets, all parameter arguments must be specified.

Expand Down
8 changes: 4 additions & 4 deletions docs/_indicators/Keltner.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ KeltnerResults[KeltnerResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `upper_band` | Decimal, Optional | Upper band of Keltner Channel
| `center_line` | Decimal, Optional | EMA of Close price
| `lower_band` | Decimal, Optional | Lower band of Keltner Channel
| `width` | Decimal, Optional | Width as percent of Centerline price. `(upper_band-lower_band)/center_line`
| `upper_band` | float, Optional | Upper band of Keltner Channel
| `center_line` | float, Optional | EMA of Close price
| `lower_band` | float, Optional | Lower band of Keltner Channel
| `width` | float, Optional | Width as percent of Centerline price. `(upper_band-lower_band)/center_line`

### Utilities

Expand Down
6 changes: 3 additions & 3 deletions docs/_indicators/MaEnvelopes.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ MAEnvelopeResults[MAEnvelopeResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `center_line` | Decimal, Optional | Moving average for `N` lookback periods
| `upper_envelope` | Decimal, Optional | Upper envelope band
| `lower_envelope` | Decimal, Optional | Lower envelope band
| `center_line` | float, Optional | Moving average
| `upper_envelope` | float, Optional | Upper envelope band
| `lower_envelope` | float, Optional | Lower envelope band

The moving average `center_line` is based on the `ma_type` type specified.

Expand Down
4 changes: 2 additions & 2 deletions docs/_indicators/Macd.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ MACDResults[MACDResult]
| `macd` | float, Optional | The MACD line is the difference between slow and fast moving averages (`macd = fast_ema - slow_ema`)
| `signal` | float, Optional | Moving average of the `macd` line
| `histogram` | float, Optional | Gap between of the `macd` and `signal` line
| `fast_ema` | Decimal, Optional | Fast Exponential Moving Average
| `slow_ema` | Decimal, Optional | Slow Exponential Moving Average
| `fast_ema` | float, Optional | Fast Exponential Moving Average
| `slow_ema` | float, Optional | Slow Exponential Moving Average

### Utilities

Expand Down
4 changes: 2 additions & 2 deletions docs/_indicators/Mama.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ MAMAResults[MAMAResult]
| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `mama` | Decimal, Optional | MESA adaptive moving average (MAMA)
| `fama` | Decimal, Optional | Following adaptive moving average (FAMA)
| `mama` | float, Optional | MESA adaptive moving average (MAMA)
| `fama` | float, Optional | Following adaptive moving average (FAMA)

### Utilities

Expand Down
Loading

0 comments on commit 6d69b11

Please sign in to comment.