factor-expr


Namefactor-expr JSON
Version 0.3.0 PyPI version JSON
download
home_page
SummaryExtreme fast factor expression & computation library for Python.
upload_time2024-01-23 06:17:00
maintainer
docs_urlNone
authorWeiyuan Wu
requires_python>=3.11,<4.0
licenseMIT
keywords factor expression alpha s-expression quantative trading trading algotrading
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Factor Expr [![status][ci_badge]][ci_page] [![pypi][pypi_badge]][pypi_page]
[ci_badge]: https://github.com/dovahcrow/factor-expr/workflows/ci/badge.svg
[ci_page]: https://github.com/dovahcrow/factor-expr/actions
[pypi_badge]: https://img.shields.io/pypi/v/factor-expr?color=green&style=flat-square
[pypi_page]: https://pypi.org/project/factor-expr/

<center>
<table>
<tr>
<th>Factor Expression</th>
<th></th>
<th>Historical Data</th>
<th></th>
<th>Factor Values</th>
</tr>
<tr>
<td>(LogReturn 30 :close)</td>
<td>+</td>
<td>2019-12-27~2020-01-14.pq</td>
<td>=</td>
<td>[0.01, 0.035, ...]</td>
</tr>
</table>
</center>

----------

Extreme fast factor expression & computation library for quantitative trading in Python.

On a server with an E7-4830 CPU (16 cores, 2000MHz),
computing 48 factors over a dataset with 24.5M rows x 683 columns (12GB) takes 150s.

Join [\[Discussions\]](https://github.com/dovahcrow/factor-expr/discussions) for Q&A and feature proposal!

## Features

* Express factors in [S-Expression](https://en.wikipedia.org/wiki/S-expression).
* Compute factors in parallel over multiple factors and multiple datasets.
  
## Usage

There are three steps to use this library.

1. Prepare the datasets into files. Currently, only the [Parquet](https://parquet.apache.org/) format is supported.
2. Define factors using [S-Expression](https://en.wikipedia.org/wiki/S-expression).
3. Run `replay` to compute the factors on the dataset.

### 1. Prepare the dataset

A dataset is a tabular format with float64 columns and arbitrary column names. 
Each row in the dataset represents a tick, e.g. for a daily dataset, each row is one day.
For example, here is an OHLC candle dataset representing 2 ticks:

```python
df = pd.DataFrame({
    "open": [3.1, 5.8], 
    "high": [8.8, 7.7], 
    "low": [1.1, 2.1], 
    "close": [4.4, 3.4]
})
```

You can use the following code to store the DataFrame into a Parquet file:
```python
df.to_parquet("data.pq")
```

### 2. Define your factors

`Factor Expr` uses the S-Expression to describe a factor. 
For example, on a daily OHLC dataset, the 30 days log return on the column `close` is expressed as:

```python
from factor_expr import Factor

Factor("(LogReturn 30 :close)")
```

Note, in `Factor Expr`, column names are referred by the `:column-name` syntax.

### 3. Compute the factors on the prepared dataset

Following step 1 and 2, you can now compute the factors using the `replay` function:

```python
from factor_expr import Factor, replay

result = await replay(
    ["data.pq"],
    [Factor("(LogReturn 30 :close)")]
)
```

The first parameter of `replay` is a list of dataset files and the second parameter is a list of Factors. This gives you the ability to compute multiple factors on multiple datasets.
Don't worry about the performance! `Factor Expr` allows you parallelize the computation over the factors as well as the datasets by setting `n_factor_jobs` and `n_data_jobs` in the `replay` function.

The returned result is a pandas DataFrame with factors as the column names and `time` as the index. 
In case of multiple datasets are passed in, the results will be concatenated with the exact order of the datasets. This is useful if you have a scattered dataset. E.g. one file for each year.

For example, the code above will give you a DataFrame looks similar to this:

| index | (LogReturn 30 :close) |
| ----- | ----------------------- |
| 0     | 0.23                    |
| ...   | ...                     |

Check out the [docstring](#replay) of `replay` for more information!

## Installation

```bash
pip install factor-expr
```

## Supported Functions
Notations: 
* `<const>` means a constant, e.g. `3`.
* `<expr>` means either a constant or an S-Expression or a column name, e.g. `3` or `(+ :close 3)` or `:open`.

Here's the full list of supported functions. If you didn't find one you need, 
consider asking on [Discussions](https://github.com/dovahcrow/factor-expr/discussions) or creating a PR!

### Arithmetics
* Addition: `(+ <expr> <expr>)`
* Subtraction: `(- <expr> <expr>)`
* Multiplication: `(* <expr> <expr>)`
* Division: `(/ <expr> <expr>)`
* Power: `(^ <const> <expr>)` - compute `<expr> ^ <const>`
* Negation: `(Neg <expr>)`
* Signed Power: `(SPow <const> <expr>)` - compute `sign(<expr>) * abs(<expr>) ^ <const>`
* Natural Logarithm after Absolute: `(LogAbs <expr>)`
* Sign: `(Sign <expr>)`
* Abs: `(Abs <expr>)`

### Logics

Any `<expr>` larger than 0 are treated as `true`.

* If: `(If <expr> <expr> <expr>)` - if the first `<expr>` is larger than 0, return the second `<expr>` otherwise return the third `<expr>`
* And: `(And <expr> <expr>)`
* Or: `(Or <expr> <expr>)`
* Less Than: `(< <expr> <expr>)`
* Less Than or Equal: `(<= <expr> <expr>)`
* Great Than: `(> <expr> <expr>)`
* Greate Than or Equal: `(>= <expr> <expr>)`
* Equal: `(== <expr> <expr>)`
* Not: `(! <expr>)`

### Window Functions

All the window functions take a window size as the first argument. The computation will be done on the look-back window with the size given in `<const>`.

* Sum of the window elements: `(Sum <const> <expr>)`
* Mean of the window elements: `(Mean <const> <expr>)`
* Min of the window elements: `(Min <const> <expr>)`
* Max of the window elements: `(Max <const> <expr>)`
* The index of the min of the window elements: `(ArgMin <const> <expr>)`
* The index of the max of the window elements: `(ArgMax <const> <expr>)`
* Stdev of the window elements: `(Std <const> <expr>)`
* Skew of the window elements: `(Skew <const> <expr>)`
* The rank (ascending) of the current element in the window: `(Rank <const> <expr>)`
* The value `<const>` ticks back: `(Delay <const> <expr>)`
* The log return of the value `<const>` ticks back to current value: `(LogReturn <const> <expr>)`
* Rolling correlation between two series: `(Correlation <const> <expr> <expr>)`
* Rolling quantile of a series: `(Quantile <const> <const> <expr>)`, e.g. `(Quantile 100 0.5 <expr>)` computes the median of a window sized 100.

#### Warm-up Period for Window Functions

Factors containing window functions require a warm-up period. For example, for
`(Sum 10 :close)`, it will not generate data until the 10th tick is replayed.
In this case, `replay` will write `NaN` into the result during the warm-up period, until the factor starts to produce data.
This ensures the length of the factor output will be as same as the length of the input dataset. You can use the `trim`
parameter to let replay trim off the warm-up period before it returns.

## Factors Failed to Compute

`Factor Expr` guarantees that there will not be any `inf`, `-inf` or `NaN` appear in the result, except for the warm-up period. However, sometimes a factor can fail due to numerical issues. For example, `(Pow 3 (Pow 3 (Pow 3 :volume)))` might overflow and become `inf`, and `1 / inf` will become `NaN`. `Factor Expr` will detect these situations and mark these factors as failed. The failed factors will still be returned in the replay result, but the values in that column will be all `NaN`. You can easily remove these failed factors from the result by using `pd.DataFrame.dropna(axis=1, how="all")`.

## I Want to Have a Time Index for the Result

The `replay` function optionally accepts a `index_col` parameter. 
If you want to set a column from the dataset as the index of the returned result, you can do the following:

```python
from factor_expr import Factor, replay

pd.DataFrame({
    "time": [datetime(2021,4,23), datetime(2021,4,24)], 
    "open": [3.1, 5.8], 
    "high": [8.8, 7.7], 
    "low": [1.1, 2.1], 
    "close": [4.4, 3.4],
}).to_parquet("data.pq")

result = await replay(
    ["data.pq"],
    [Factor("(LogReturn 30 :close)")],
    index_col="time",
)
```

Note, accessing the `time` column from factor expressions will cause an error. 
Factor expressions can only read `float64` columns.

## API

There are two components in `Factor Expr`, a `Factor` class and a `replay` function.

### Factor

The factor class takes an S-Expression to construct. It has the following signature:

```python
class Factor:
    def __init__(sexpr: str) -> None:
        """Construct a Factor using an S-Expression"""

    def ready_offset(self) -> int:
        """Returns the first index after the warm-up period. 
        For non-window functions, this will always return 0."""

    def __len__(self) -> int:
        """Returns how many subtrees contained in this factor tree.

        Example
        -------
        `(+ (/ :close :open) :high)` has 5 subtrees, namely:
        1. (+ (/ :close :open) :high)
        2. (/ :close :open)
        3. :close
        4. :open
        5. :high
        """

    def __getitem__(self, i:int) -> Factor:
        """Get the i-th subtree of the sequence from the pre-order traversal of the factor tree.

        Example
        -------
        `(+ (/ :close :open) :high)` is traversed as:
        0. (+ (/ :close :open) :high)
        1. (/ :close :open)
        2. :close
        3. :open
        4. :high

        Consequently, f[2] will give you `Factor(":close")`.
        """

    def depth(self) -> int:
        """How deep is this factor tree.

        Example
        -------
        `(+ (/ :close :open) :high)` has a depth of 2, namely:
        1. (+ (/ :close :open) :high)
        2. (/ :close :open)
        """

    def child_indices(self) -> List[int]:
        """The indices for the children of this factor tree.

        Example
        -------
        The child_indices result of `(+ (/ :close :open) :high)` is [1, 4]
        """
        
    def replace(self, i: int, other: Factor) -> Factor:
        """Replace the i-th node with another subtree.

        Example
        -------
        `Factor("+ (/ :close :open) :high").replace(4, Factor("(- :high :low)")) == Factor("+ (/ :close :open) (- :high :low)")`
        """

    def columns(self) -> List[str]:
        """Return all the columns that are used by this factor.

        Example
        -------
        `(+ (/ :close :open) :high)` uses [:close, :open, :high].
        """
    
    def clone(self) -> Factor:
        """Create a copy of itself."""
```

### replay

Replay has the following signature:

```python
async def replay(
    files: Iterable[str],
    factors: List[Factor],
    *,
    reset: bool = True,
    batch_size: int = 40960,
    n_data_jobs: int = 1,
    n_factor_jobs: int = 1,
    pbar: bool = True,
    verbose: bool = False,
    output: Literal["pandas", "pyarrow", "raw"] = "pandas",
) -> Union[pd.DataFrame, pa.Table]:
    """
    Replay a list of factors on a bunch of data.

    Parameters
    ----------
    files: Iterable[str | pa.Table]
        Paths to the datasets. Or already read pyarrow Tables.
    factors: List[Factor]
        A list of Factors to replay.
    reset: bool = True
        Whether to reset the factors. Factors carries memory about the data they already replayed. If you are calling
        replay multiple times and the factors should not starting from fresh, set this to False.
    batch_size: int = 40960
        How many rows to replay at one time. Default is 40960 rows.
    n_data_jobs: int = 1
        How many datasets to run in parallel. Note that the factor level parallelism is controlled by n_factor_jobs.
    n_factor_jobs: int = 1
        How many factors to run in parallel for **each** dataset.
        e.g. if `n_data_jobs=3` and `n_factor_jobs=5`, you will have 3 * 5 threads running concurrently.
    pbar: bool = True
        Whether to show the progress bar using tqdm.
    verbose: bool = False
        If True, failed factors will be printed out in stderr.
    output: Literal["pyarrow" | "raw"] = "pyarrow"
        The return format, can be pyarrow Table ("pyarrow") or un-concatenated pyarrow Tables ("raw").
    """
```



            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "factor-expr",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11,<4.0",
    "maintainer_email": "",
    "keywords": "factor,expression,alpha,S-expression,quantative trading,trading,algotrading",
    "author": "Weiyuan Wu",
    "author_email": "youngw@sfu.ca",
    "download_url": "",
    "platform": null,
    "description": "# Factor Expr [![status][ci_badge]][ci_page] [![pypi][pypi_badge]][pypi_page]\n[ci_badge]: https://github.com/dovahcrow/factor-expr/workflows/ci/badge.svg\n[ci_page]: https://github.com/dovahcrow/factor-expr/actions\n[pypi_badge]: https://img.shields.io/pypi/v/factor-expr?color=green&style=flat-square\n[pypi_page]: https://pypi.org/project/factor-expr/\n\n<center>\n<table>\n<tr>\n<th>Factor Expression</th>\n<th></th>\n<th>Historical Data</th>\n<th></th>\n<th>Factor Values</th>\n</tr>\n<tr>\n<td>(LogReturn 30 :close)</td>\n<td>+</td>\n<td>2019-12-27~2020-01-14.pq</td>\n<td>=</td>\n<td>[0.01, 0.035, ...]</td>\n</tr>\n</table>\n</center>\n\n----------\n\nExtreme fast factor expression & computation library for quantitative trading in Python.\n\nOn a server with an E7-4830 CPU (16 cores, 2000MHz),\ncomputing 48 factors over a dataset with 24.5M rows x 683 columns (12GB) takes 150s.\n\nJoin [\\[Discussions\\]](https://github.com/dovahcrow/factor-expr/discussions) for Q&A and feature proposal!\n\n## Features\n\n* Express factors in [S-Expression](https://en.wikipedia.org/wiki/S-expression).\n* Compute factors in parallel over multiple factors and multiple datasets.\n  \n## Usage\n\nThere are three steps to use this library.\n\n1. Prepare the datasets into files. Currently, only the [Parquet](https://parquet.apache.org/) format is supported.\n2. Define factors using [S-Expression](https://en.wikipedia.org/wiki/S-expression).\n3. Run `replay` to compute the factors on the dataset.\n\n### 1. Prepare the dataset\n\nA dataset is a tabular format with float64 columns and arbitrary column names. \nEach row in the dataset represents a tick, e.g. for a daily dataset, each row is one day.\nFor example, here is an OHLC candle dataset representing 2 ticks:\n\n```python\ndf = pd.DataFrame({\n    \"open\": [3.1, 5.8], \n    \"high\": [8.8, 7.7], \n    \"low\": [1.1, 2.1], \n    \"close\": [4.4, 3.4]\n})\n```\n\nYou can use the following code to store the DataFrame into a Parquet file:\n```python\ndf.to_parquet(\"data.pq\")\n```\n\n### 2. Define your factors\n\n`Factor Expr` uses the S-Expression to describe a factor. \nFor example, on a daily OHLC dataset, the 30 days log return on the column `close` is expressed as:\n\n```python\nfrom factor_expr import Factor\n\nFactor(\"(LogReturn 30 :close)\")\n```\n\nNote, in `Factor Expr`, column names are referred by the `:column-name` syntax.\n\n### 3. Compute the factors on the prepared dataset\n\nFollowing step 1 and 2, you can now compute the factors using the `replay` function:\n\n```python\nfrom factor_expr import Factor, replay\n\nresult = await replay(\n    [\"data.pq\"],\n    [Factor(\"(LogReturn 30 :close)\")]\n)\n```\n\nThe first parameter of `replay` is a list of dataset files and the second parameter is a list of Factors. This gives you the ability to compute multiple factors on multiple datasets.\nDon't worry about the performance! `Factor Expr` allows you parallelize the computation over the factors as well as the datasets by setting `n_factor_jobs` and `n_data_jobs` in the `replay` function.\n\nThe returned result is a pandas DataFrame with factors as the column names and `time` as the index. \nIn case of multiple datasets are passed in, the results will be concatenated with the exact order of the datasets. This is useful if you have a scattered dataset. E.g. one file for each year.\n\nFor example, the code above will give you a DataFrame looks similar to this:\n\n| index | (LogReturn 30 :close) |\n| ----- | ----------------------- |\n| 0     | 0.23                    |\n| ...   | ...                     |\n\nCheck out the [docstring](#replay) of `replay` for more information!\n\n## Installation\n\n```bash\npip install factor-expr\n```\n\n## Supported Functions\nNotations: \n* `<const>` means a constant, e.g. `3`.\n* `<expr>` means either a constant or an S-Expression or a column name, e.g. `3` or `(+ :close 3)` or `:open`.\n\nHere's the full list of supported functions. If you didn't find one you need, \nconsider asking on [Discussions](https://github.com/dovahcrow/factor-expr/discussions) or creating a PR!\n\n### Arithmetics\n* Addition: `(+ <expr> <expr>)`\n* Subtraction: `(- <expr> <expr>)`\n* Multiplication: `(* <expr> <expr>)`\n* Division: `(/ <expr> <expr>)`\n* Power: `(^ <const> <expr>)` - compute `<expr> ^ <const>`\n* Negation: `(Neg <expr>)`\n* Signed Power: `(SPow <const> <expr>)` - compute `sign(<expr>) * abs(<expr>) ^ <const>`\n* Natural Logarithm after Absolute: `(LogAbs <expr>)`\n* Sign: `(Sign <expr>)`\n* Abs: `(Abs <expr>)`\n\n### Logics\n\nAny `<expr>` larger than 0 are treated as `true`.\n\n* If: `(If <expr> <expr> <expr>)` - if the first `<expr>` is larger than 0, return the second `<expr>` otherwise return the third `<expr>`\n* And: `(And <expr> <expr>)`\n* Or: `(Or <expr> <expr>)`\n* Less Than: `(< <expr> <expr>)`\n* Less Than or Equal: `(<= <expr> <expr>)`\n* Great Than: `(> <expr> <expr>)`\n* Greate Than or Equal: `(>= <expr> <expr>)`\n* Equal: `(== <expr> <expr>)`\n* Not: `(! <expr>)`\n\n### Window Functions\n\nAll the window functions take a window size as the first argument. The computation will be done on the look-back window with the size given in `<const>`.\n\n* Sum of the window elements: `(Sum <const> <expr>)`\n* Mean of the window elements: `(Mean <const> <expr>)`\n* Min of the window elements: `(Min <const> <expr>)`\n* Max of the window elements: `(Max <const> <expr>)`\n* The index of the min of the window elements: `(ArgMin <const> <expr>)`\n* The index of the max of the window elements: `(ArgMax <const> <expr>)`\n* Stdev of the window elements: `(Std <const> <expr>)`\n* Skew of the window elements: `(Skew <const> <expr>)`\n* The rank (ascending) of the current element in the window: `(Rank <const> <expr>)`\n* The value `<const>` ticks back: `(Delay <const> <expr>)`\n* The log return of the value `<const>` ticks back to current value: `(LogReturn <const> <expr>)`\n* Rolling correlation between two series: `(Correlation <const> <expr> <expr>)`\n* Rolling quantile of a series: `(Quantile <const> <const> <expr>)`, e.g. `(Quantile 100 0.5 <expr>)` computes the median of a window sized 100.\n\n#### Warm-up Period for Window Functions\n\nFactors containing window functions require a warm-up period. For example, for\n`(Sum 10 :close)`, it will not generate data until the 10th tick is replayed.\nIn this case, `replay` will write `NaN` into the result during the warm-up period, until the factor starts to produce data.\nThis ensures the length of the factor output will be as same as the length of the input dataset. You can use the `trim`\nparameter to let replay trim off the warm-up period before it returns.\n\n## Factors Failed to Compute\n\n`Factor Expr` guarantees that there will not be any `inf`, `-inf` or `NaN` appear in the result, except for the warm-up period. However, sometimes a factor can fail due to numerical issues. For example, `(Pow 3 (Pow 3 (Pow 3 :volume)))` might overflow and become `inf`, and `1 / inf` will become `NaN`. `Factor Expr` will detect these situations and mark these factors as failed. The failed factors will still be returned in the replay result, but the values in that column will be all `NaN`. You can easily remove these failed factors from the result by using `pd.DataFrame.dropna(axis=1, how=\"all\")`.\n\n## I Want to Have a Time Index for the Result\n\nThe `replay` function optionally accepts a `index_col` parameter. \nIf you want to set a column from the dataset as the index of the returned result, you can do the following:\n\n```python\nfrom factor_expr import Factor, replay\n\npd.DataFrame({\n    \"time\": [datetime(2021,4,23), datetime(2021,4,24)], \n    \"open\": [3.1, 5.8], \n    \"high\": [8.8, 7.7], \n    \"low\": [1.1, 2.1], \n    \"close\": [4.4, 3.4],\n}).to_parquet(\"data.pq\")\n\nresult = await replay(\n    [\"data.pq\"],\n    [Factor(\"(LogReturn 30 :close)\")],\n    index_col=\"time\",\n)\n```\n\nNote, accessing the `time` column from factor expressions will cause an error. \nFactor expressions can only read `float64` columns.\n\n## API\n\nThere are two components in `Factor Expr`, a `Factor` class and a `replay` function.\n\n### Factor\n\nThe factor class takes an S-Expression to construct. It has the following signature:\n\n```python\nclass Factor:\n    def __init__(sexpr: str) -> None:\n        \"\"\"Construct a Factor using an S-Expression\"\"\"\n\n    def ready_offset(self) -> int:\n        \"\"\"Returns the first index after the warm-up period. \n        For non-window functions, this will always return 0.\"\"\"\n\n    def __len__(self) -> int:\n        \"\"\"Returns how many subtrees contained in this factor tree.\n\n        Example\n        -------\n        `(+ (/ :close :open) :high)` has 5 subtrees, namely:\n        1. (+ (/ :close :open) :high)\n        2. (/ :close :open)\n        3. :close\n        4. :open\n        5. :high\n        \"\"\"\n\n    def __getitem__(self, i:int) -> Factor:\n        \"\"\"Get the i-th subtree of the sequence from the pre-order traversal of the factor tree.\n\n        Example\n        -------\n        `(+ (/ :close :open) :high)` is traversed as:\n        0. (+ (/ :close :open) :high)\n        1. (/ :close :open)\n        2. :close\n        3. :open\n        4. :high\n\n        Consequently, f[2] will give you `Factor(\":close\")`.\n        \"\"\"\n\n    def depth(self) -> int:\n        \"\"\"How deep is this factor tree.\n\n        Example\n        -------\n        `(+ (/ :close :open) :high)` has a depth of 2, namely:\n        1. (+ (/ :close :open) :high)\n        2. (/ :close :open)\n        \"\"\"\n\n    def child_indices(self) -> List[int]:\n        \"\"\"The indices for the children of this factor tree.\n\n        Example\n        -------\n        The child_indices result of `(+ (/ :close :open) :high)` is [1, 4]\n        \"\"\"\n        \n    def replace(self, i: int, other: Factor) -> Factor:\n        \"\"\"Replace the i-th node with another subtree.\n\n        Example\n        -------\n        `Factor(\"+ (/ :close :open) :high\").replace(4, Factor(\"(- :high :low)\")) == Factor(\"+ (/ :close :open) (- :high :low)\")`\n        \"\"\"\n\n    def columns(self) -> List[str]:\n        \"\"\"Return all the columns that are used by this factor.\n\n        Example\n        -------\n        `(+ (/ :close :open) :high)` uses [:close, :open, :high].\n        \"\"\"\n    \n    def clone(self) -> Factor:\n        \"\"\"Create a copy of itself.\"\"\"\n```\n\n### replay\n\nReplay has the following signature:\n\n```python\nasync def replay(\n    files: Iterable[str],\n    factors: List[Factor],\n    *,\n    reset: bool = True,\n    batch_size: int = 40960,\n    n_data_jobs: int = 1,\n    n_factor_jobs: int = 1,\n    pbar: bool = True,\n    verbose: bool = False,\n    output: Literal[\"pandas\", \"pyarrow\", \"raw\"] = \"pandas\",\n) -> Union[pd.DataFrame, pa.Table]:\n    \"\"\"\n    Replay a list of factors on a bunch of data.\n\n    Parameters\n    ----------\n    files: Iterable[str | pa.Table]\n        Paths to the datasets. Or already read pyarrow Tables.\n    factors: List[Factor]\n        A list of Factors to replay.\n    reset: bool = True\n        Whether to reset the factors. Factors carries memory about the data they already replayed. If you are calling\n        replay multiple times and the factors should not starting from fresh, set this to False.\n    batch_size: int = 40960\n        How many rows to replay at one time. Default is 40960 rows.\n    n_data_jobs: int = 1\n        How many datasets to run in parallel. Note that the factor level parallelism is controlled by n_factor_jobs.\n    n_factor_jobs: int = 1\n        How many factors to run in parallel for **each** dataset.\n        e.g. if `n_data_jobs=3` and `n_factor_jobs=5`, you will have 3 * 5 threads running concurrently.\n    pbar: bool = True\n        Whether to show the progress bar using tqdm.\n    verbose: bool = False\n        If True, failed factors will be printed out in stderr.\n    output: Literal[\"pyarrow\" | \"raw\"] = \"pyarrow\"\n        The return format, can be pyarrow Table (\"pyarrow\") or un-concatenated pyarrow Tables (\"raw\").\n    \"\"\"\n```\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Extreme fast factor expression & computation library for Python.",
    "version": "0.3.0",
    "project_urls": null,
    "split_keywords": [
        "factor",
        "expression",
        "alpha",
        "s-expression",
        "quantative trading",
        "trading",
        "algotrading"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fda84b8296627211a3af24f3df64afcde82531884c93a9599e8b4e7570d03d35",
                "md5": "b1ecdebd592fb7816564a912491f964b",
                "sha256": "aa70d0d7acf033adcdce249f52a6b4cdbbc9df7879ec78ba85c3e3f9f3e6281d"
            },
            "downloads": -1,
            "filename": "factor_expr-0.3.0-cp311-cp311-macosx_10_15_intel.whl",
            "has_sig": false,
            "md5_digest": "b1ecdebd592fb7816564a912491f964b",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.11,<4.0",
            "size": 3543133,
            "upload_time": "2024-01-23T06:17:00",
            "upload_time_iso_8601": "2024-01-23T06:17:00.008128Z",
            "url": "https://files.pythonhosted.org/packages/fd/a8/4b8296627211a3af24f3df64afcde82531884c93a9599e8b4e7570d03d35/factor_expr-0.3.0-cp311-cp311-macosx_10_15_intel.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "db2dba1dd9b4efc8f67ad69da5d71854a078f41e196afd6799e8161b26807385",
                "md5": "4db06534492765b091248456195d8d1b",
                "sha256": "937d52ccf098b9843221d4a852e24a7e0bc200bf7eac53feee9a5fe3c673d61b"
            },
            "downloads": -1,
            "filename": "factor_expr-0.3.0-cp311-cp311-manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "4db06534492765b091248456195d8d1b",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.11,<4.0",
            "size": 3283677,
            "upload_time": "2024-01-23T06:16:54",
            "upload_time_iso_8601": "2024-01-23T06:16:54.656061Z",
            "url": "https://files.pythonhosted.org/packages/db/2d/ba1dd9b4efc8f67ad69da5d71854a078f41e196afd6799e8161b26807385/factor_expr-0.3.0-cp311-cp311-manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ad8a9deea0a8f714910e279a9e127c1ba57392f3cb1cee14fa8bbd68f1c06870",
                "md5": "4ab9c03518f269bd23695d4964e3b6c7",
                "sha256": "db2b9fb42d643d43f2d7f0b091f1ae4c87b45f21f9434f87dcf90c279334bb46"
            },
            "downloads": -1,
            "filename": "factor_expr-0.3.0-cp311-cp311-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "4ab9c03518f269bd23695d4964e3b6c7",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.11,<4.0",
            "size": 2925770,
            "upload_time": "2024-01-23T06:17:05",
            "upload_time_iso_8601": "2024-01-23T06:17:05.528102Z",
            "url": "https://files.pythonhosted.org/packages/ad/8a/9deea0a8f714910e279a9e127c1ba57392f3cb1cee14fa8bbd68f1c06870/factor_expr-0.3.0-cp311-cp311-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "687ab3e7bda1f2165cf2f9f9f6a252a0db43b74aa061bf4f4e37f7c89317ff3a",
                "md5": "72255d8716646915bc11b20a58e65566",
                "sha256": "9ad9c3e7d6693bdf9764c335e2ad87f75d2a5e11f1617a0f6df1b0ba9d2b19e1"
            },
            "downloads": -1,
            "filename": "factor_expr-0.3.0-cp312-cp312-macosx_10_15_intel.whl",
            "has_sig": false,
            "md5_digest": "72255d8716646915bc11b20a58e65566",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.11,<4.0",
            "size": 3543989,
            "upload_time": "2024-01-23T06:17:02",
            "upload_time_iso_8601": "2024-01-23T06:17:02.686133Z",
            "url": "https://files.pythonhosted.org/packages/68/7a/b3e7bda1f2165cf2f9f9f6a252a0db43b74aa061bf4f4e37f7c89317ff3a/factor_expr-0.3.0-cp312-cp312-macosx_10_15_intel.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f466216d39fa24590f478a0b0bd31be1ec456c090c1e56f0335d2de19084ca80",
                "md5": "bdcf883c15adbba8a49435005781670a",
                "sha256": "13bf2389597564b6898e325ba61c0f4253db18de4a0e436209850eebd6ef7fa6"
            },
            "downloads": -1,
            "filename": "factor_expr-0.3.0-cp312-cp312-manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "bdcf883c15adbba8a49435005781670a",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.11,<4.0",
            "size": 3287712,
            "upload_time": "2024-01-23T06:16:57",
            "upload_time_iso_8601": "2024-01-23T06:16:57.518557Z",
            "url": "https://files.pythonhosted.org/packages/f4/66/216d39fa24590f478a0b0bd31be1ec456c090c1e56f0335d2de19084ca80/factor_expr-0.3.0-cp312-cp312-manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9cfbd93af87e9041a380bd58ac1ce71e644ff9f1f08038d7285b20afffcf13da",
                "md5": "2483ad1bffbbc7592b0e8b6fff988f41",
                "sha256": "79ad975b282df8f1ffd6422531bc8dba0ca72da36300704c935e8ed896d995f3"
            },
            "downloads": -1,
            "filename": "factor_expr-0.3.0-cp312-cp312-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "2483ad1bffbbc7592b0e8b6fff988f41",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.11,<4.0",
            "size": 2925742,
            "upload_time": "2024-01-23T06:17:08",
            "upload_time_iso_8601": "2024-01-23T06:17:08.547626Z",
            "url": "https://files.pythonhosted.org/packages/9c/fb/d93af87e9041a380bd58ac1ce71e644ff9f1f08038d7285b20afffcf13da/factor_expr-0.3.0-cp312-cp312-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-23 06:17:00",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "factor-expr"
}
        
Elapsed time: 0.20395s