Download cpp_engine/include/simd_alpha_calculator.hpp from Ypeng12/quant-ai: direct link, hf CLI and curl.
- Browser
- Download file 1.07 kB
-
https://huggingface.co/spaces/Ypeng12/quant-ai/resolve/main/cpp_engine/include/simd_alpha_calculator.hpp
- Command line
-
hf download hf://spaces/Ypeng12/quant-ai/cpp_engine/include/simd_alpha_calculator.hpp
-
curl -L -o simd_alpha_calculator.hpp https://huggingface.co/spaces/Ypeng12/quant-ai/resolve/main/cpp_engine/include/simd_alpha_calculator.hpp
1.07 kB
| // cpp_engine/include/simd_alpha_calculator.hpp | |
| class SIMDAlphaCalculator { | |
| public: | |
| // Fast vector calculation of Order Flow Imbalance (OFI) | |
| static std::vector<double> calculate_ofi_vectorized( | |
| const std::vector<double>& bid_prices, | |
| const std::vector<double>& bid_sizes, | |
| const std::vector<double>& ask_prices, | |
| const std::vector<double>& ask_sizes | |
| ); | |
| // Fast vector calculation of MicroPrice Drift Velocity | |
| static std::vector<double> calculate_microprice_velocity( | |
| const std::vector<double>& mid_prices, | |
| const std::vector<double>& ofi_signals, | |
| size_t window = 5 | |
| ); | |
| // Calculation of Volume-Synchronized Probability of Toxicity (VPIN) | |
| static double calculate_vpin_toxicity( | |
| const std::vector<double>& trade_volumes, | |
| const std::vector<double>& price_changes, | |
| size_t bucket_size = 1000 | |
| ); | |
| }; | |