ezyquant.utils#

Functions

cache_dataframe_wrapper(method)

Wrap a method to cache the result of the method.

cache_wrapper([func, maxsize, is_copy])

Cache the result of a function using lru_cache.

cached_property(x)

count_max_true_consecutive(s)

Count the number of consecutive True values in a series.

count_true_consecutive(s)

date_to_str(value)

is_rebalance(trade_date_index, rebalance_at, ...)

is_rebalance_monthly(trade_date_index, ...)

Return a series of bool, True if the date is a rebalance date.

is_rebalance_weekly(trade_date_index, ...)

Return a series of bool, True if the date is a rebalance date.

pivot_remove_index_name(df, *args, **kwargs)

round_down(value[, base])

str_date_add_timedelta(value, delta)

str_to_date(value)

str_to_datetime(value)

union_datetime_index(indexes)

wrap_cache_class(cls)

Classes

CacheMetaClass(clsname, bases, attrs)

Meta class for cache_wrapper.