Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TickStats aggregation and rename TimeSeriesStats #24

Open
2 tasks
MHHukiewitz opened this issue Jan 27, 2023 · 0 comments
Open
2 tasks

Add TickStats aggregation and rename TimeSeriesStats #24

MHHukiewitz opened this issue Jan 27, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request usability Impacts the user/dev experience

Comments

@MHHukiewitz
Copy link
Member

MHHukiewitz commented Jan 27, 2023

The class in timeSeries.ts is currently being used to aggregate event-level data in intervals called TimeFrames.

These come close to the concept of "Candlestick" data, and I propose to rename them accordingly due to the misleading naming as "TimeSeries" which simply means:

A time series is a sequence of data points that occur in successive order over some period of time.

In my latest work on integrating SPL Lending program's instructions into the TokenSnapshot indexer, I have the requirement to efficiently aggregate all events such that a linked and aggregated data point will be created for every event to receive tick-level data. A tick describes:

A tick is a measure of the minimum upward or downward movement in the price of a security. A tick can also refer to the change in the price of a security from one trade to the next trade.

Suggested changes

  • Following the latter definition, I would suggest implementing a new type of stats aggregator: TickStats for event-level aggregation of statistics.
  • The previously called TimeSeriesStats and all related classes/variables could be renamed to CandlestickStats, to appeal to DeFi users, or more generally, IntervalStats.

Note: These two steps should be conducted in two separate PRs.

@MHHukiewitz MHHukiewitz added enhancement New feature or request usability Impacts the user/dev experience labels Jan 27, 2023
@MHHukiewitz MHHukiewitz self-assigned this Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request usability Impacts the user/dev experience
Projects
None yet
Development

No branches or pull requests

1 participant