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

How to store/retrieve multivariate time series #77

Open
giangcoi48k opened this issue May 26, 2022 · 1 comment
Open

How to store/retrieve multivariate time series #77

giangcoi48k opened this issue May 26, 2022 · 1 comment
Labels
question Further information is requested

Comments

@giangcoi48k
Copy link

I have a stock price model, with multiple field-value, like this:

public class IndexSeries
{ 
	public int IndexId {get;set;}
	public long TradingDate {get;set;}  //Unix Epoch milliseconds
	public decimal OpenIndex { get; set; }
	public decimal CloseIndex { get; set; }
	public decimal HighestIndex { get; set; }
	public decimal LowestIndex { get; set; }
	public long TotalMatchVolume { get; set; } 
	public long MatchValue { get; set; }
	public long MatchVolume { get; set; }    
        ...  
}

Data is received with high frequency (at least one second), and I want to use RedisTimeSeries to store/retrieve. How can I do this?

@LiorKogan
Copy link
Member

LiorKogan commented May 28, 2022

Each time series in RedisTimeSeries can store a single metric. However, you can create multiple time series, each with a different metric.

Hence, in your example, for each stock - you should create 7 time series.

You can also set series metadata for each series (e.g., stock = 1234, datatype = openIndex). You can then aggregate over multiple time series (e.g., over all time series with datatype = openIndex).

@LiorKogan LiorKogan added the question Further information is requested label May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants