Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,11 @@ parameters, unless specified as keyword arguments. Typically, these functions
will have an initial "lookback" period (a required number of observations
before an output is generated) set to `NaN`.

The lookback is function-specific and does not always match the value passed
to `timeperiod`. For example, `RSI(timeperiod=14)` needs 15 price observations
because the first RSI value depends on 14 price changes between consecutive
bars, not just 14 raw prices.

For convenience, the Function API supports both `numpy.ndarray` and
`pandas.Series` and `polars.Series` inputs.

Expand Down Expand Up @@ -433,6 +438,10 @@ Calculating momentum of the close prices, with a time period of 5:
output = talib.MOM(close, timeperiod=5)
```

Functions marked in the docs as having an unstable period start with that
extra unstable-period setting at `0`. In other words, `get_unstable_period()`
returns `0` until you explicitly change it with `set_unstable_period()`.

### NaN's

The underlying TA-Lib C library handles NaN's in a sometimes surprising manner
Expand Down
8 changes: 8 additions & 0 deletions docs/func.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ parameters, unless specified as keyword arguments. Typically, these functions
will have an initial "lookback" period (a required number of observations
before an output is generated) set to ``NaN``.

The lookback is function-specific and may be larger than the `timeperiod`
parameter. For example, ``RSI(timeperiod=14)`` needs 15 price observations,
because the first RSI value is derived from 14 consecutive price changes.

All of the following examples use the function API:

```python
Expand Down Expand Up @@ -37,6 +41,10 @@ Calculating momentum of the close prices, with a time period of 5:
output = talib.MOM(close, timeperiod=5)
```

Functions documented as having an unstable period start with that extra
unstable-period setting at ``0``. ``get_unstable_period()`` only returns a
non-zero value after you set one explicitly with ``set_unstable_period()``.

Documentation for all functions:

* [Overlap Studies](func_groups/overlap_studies.md)
Expand Down
8 changes: 8 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ parameters, unless specified as keyword arguments. Typically, these functions
will have an initial "lookback" period (a required number of observations
before an output is generated) set to ``NaN``.

The lookback is function-specific and may be larger than the `timeperiod`
parameter. For example, ``RSI(timeperiod=14)`` needs 15 price observations,
because the first RSI value is based on 14 consecutive price changes.

All of the following examples use the function API:

```python
Expand Down Expand Up @@ -57,6 +61,10 @@ Calculating momentum of the close prices, with a time period of 5:
output = talib.MOM(close, timeperiod=5)
```

Functions documented as having an unstable period start with that extra
unstable-period setting at ``0``. ``get_unstable_period()`` only reports a
non-zero value after you call ``set_unstable_period()`` yourself.

## Abstract API Quick Start

If you're already familiar with using the function API, you should feel right
Expand Down