Quantization of Quote history
See original GitHub issueAdding quantization would be a nice feature:
When you have data with 1min candles, it would be nice to have built-in functionality to quantize them to another timeframe.
This is the code I’m using in F#:
let quantize chunkSize candles =
candles
|> List.chunkBySize chunkSize
|> List.map (
fun (chunk: Quote list) ->
Quote(
Date = chunk.[0].Date,
Open = chunk.[0].Open,
High = (chunk |> List.maxBy (fun c -> c.High)).High,
Low = (chunk |> List.minBy (fun c -> c.Low)).Low,
Close = chunk.[^0].Close,
Volume = (chunk |> List.sumBy (fun c -> c.Volume))
)
)
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
[2202.07838] Quantization: History and Problems
Abstract: In this work, I explore the concept of quantization as a mapping from classical phase space functions to quantum operators.
Read more >Quantization: History and problems
Thus quantization is a sort of mapping of classical theories to quantum theories, and quantization establishes a correspondence between classical theories and ...
Read more >Canonical quantization
In physics, canonical quantization is a procedure for quantizing a classical theory, while attempting to preserve the formal structure, such as symmetries, ...
Read more >1 quote on Quantization Science Quotes
Who said: “A people without children would face a hopeless future; a country without trees is almost as helpless.” Ronald Reagan George W....
Read more >The Quasi-History of Early Quantum Theory - Physics
This case study investigates the quasi-history of the discovery of energy quantization and the quantum of radiation (i.e., the “photon”) in the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
this would fall under quantization or resampling
I had done something like this for a previous library I was working with, I haven’t tested this with this library yet, but I think this is in the ballpark.