Skip to content

Commit

Permalink
Minor updates to pipelines docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nagakingg authored and chanhosuh committed Nov 8, 2022
1 parent f1a9ee4 commit a92bd59
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions curvesim/pipelines/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
Pipelines iterate over pools with parameters set by
:mod:`.param_samplers` and time-series data produced by :mod:`.price_samplers`.
Each pipeline implements a "strategy" dictating what is done at each timestep
(e.g., see :func:`.pipelines.arbitrage.strategy`).
(e.g., see :func:`.arbitrage.strategy`).
Typically, a pipeline takes in :class:`pool_data`; specifies a param_sampler,
Typically, a pipeline takes in :class:`.PoolData`; specifies a param_sampler,
price_sampler, and strategy; and returns metrics/results.
"""

Expand Down
12 changes: 6 additions & 6 deletions curvesim/pipelines/arbitrage.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,25 @@ def volume_limited_arbitrage(
At each timestep, the pool is arbitraged as close to the prevailing market price
as possible without surpassing a volume constraint. By default, volume is limited
to the total market volume at each timestep, multiplied by the ratio of historical
pool volume to total market volume over the whole simulation period (vol_mult).
to the total market volume at each timestep, scaled by the proportion of
volume attributable to the pool over the whole simulation period (vol_mult).
Parameters
----------
pool_data : :class:`.PoolData`
Pool data object for the pool of interest.
variable_params : dict, defaults to broad range of A/fee values
Pool parameters to vary across simulations. keys: pool parameters,
values: iterables of ints
Pool parameters to vary across simulations.
keys: pool parameters, values: iterables of ints
Example
--------
>>> variable_params = {"A": [100, 1000], "fee": [10**6, 4*10**6]}
fixed_params : dict, optional
Pool parameters set before all simulations. keys: pool parameters,
values: ints
Pool parameters set before all simulations.
keys: pool parameters, values: ints
Example
--------
Expand Down
5 changes: 4 additions & 1 deletion curvesim/pipelines/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ def run_pipeline(param_sampler, price_sampler, strategy, ncpu=4):
"""
Core function for running pipelines.
Typically called within a function specifying the pipeline components
(see, e.g., :func:`.volume_limited_arbitrage()`)
Parameters
----------
param_sampler : iterator
An terator that returns pool parameters (see :mod:`.param_samplers`).
An iterator that returns pool parameters (see :mod:`.param_samplers`).
price_sampler : iterator
An iterator that returns (minimally) a time-series of prices
Expand Down

0 comments on commit a92bd59

Please sign in to comment.