0% found this document useful (0 votes)
72 views

Trading Strategy

The document discusses trading strategies and algorithms including using order books, nearest neighbor searches, and KNN models. It also covers Apache IoTDB for timeseries data management and FLANN and ArrayFire libraries for fast approximate nearest neighbor searches.

Uploaded by

Aditya Suardi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views

Trading Strategy

The document discusses trading strategies and algorithms including using order books, nearest neighbor searches, and KNN models. It also covers Apache IoTDB for timeseries data management and FLANN and ArrayFire libraries for fast approximate nearest neighbor searches.

Uploaded by

Aditya Suardi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

Trading strategy

Order Book FPGA


OpenCL video cards for nearest neighbor

EliteQuant C/C++ 11 High frequency quantitative trading platform. It follows modern


design patterns such as event-driven, server/client architect, dependency injection
and loosely-coupled robust distributed system. It is self-contained and can be used
out of box. At the same time, it serves as server side for other EliteQuant
projects.

https://github.com/EliteQuant/EliteQuant_Cpp

The Algo-Logic order book is the list of orders (manual or electronic) that


a trading venue (in particular stock exchanges) uses to record the interest of
buyers and sellers in a particular financial instrument. A matching engine uses the
book to determine which orders can be fulfilled i.e. what trades can be made.
Algo-Logic Full Order Book the C++ uses OpenCL video cards for nearest neighbor
using Billion-Scale Approximate Nearest Neighbors on Apache IoTDB

Breaking it Down – Pseudo Code of KNN


We can implement a KNN model by following the below steps:

Load the data


Initialise the value of k
For getting the predicted class, iterate from 1 to total number of training data
points
Calculate the distance between test data and each row of training data. Here we
will use Euclidean distance as our distance metric since it’s the most popular
method. The other metrics that can be used are Chebyshev, cosine, etc.
• Euclidean distance between pivot point table and the value of k

Sort the calculated distances in ascending order based on distance values


Get top k rows from the sorted array
Get the most frequent class of these rows
---------
Go long if the dissimilarity is > 2.0
Go short if the similarity is > 0.0
---------
Return the predicted class

Apache IoTDB (incubating) (Database for Internet of Things)

Apache IoTDB (incubating) (Database for Internet of Things) is an integrated data


management engine designed for timeseries data which was initially developed by
Tsinghua University. Now Apache IoTDB (incubating) is an effort undergoing
incubation at The Apache Software Foundation (ASF), sponsored by the Incubator. It
can provide users specific services for data collection, storage and analysis. Due
to its light weight structure, high performance and usable features together with
its intense integration with Hadoop and Spark ecology, Apache IoTDB (incubating)
can meet the requirements of massive dataset storage, high-speed data input and
complex data analysis in the IoT industrial field.

Main Features
High-throughput read and write

Apache IoTDB (incubating) supports millions of low-power devices' strong connection


data access, high-speed data read and write for intelligent networking devices and
mixed devices mentioned above.
Efficient directory structure

Apache IoTDB (incubating) supports efficient organization for complex data


structure from IoT devices, organization for large size of timeseries data, fuzzy
searching strategy for complex directory of timeseries data.

Rich query semantics

Apache IoTDB (incubating) supports time alignment for timeseries data accross
devices and sensors, computation in timeseries field (frequency domain) and rich
aggregation function support in time dimension.
Revisiting the Inverted Indices for Billion-Scale Approximate Nearest Neighbors

This is the code for the current state-of-the-art billion-scale nearest neighbor
search system presented in the paper:

Revisiting the Inverted Indices for Billion-Scale Approximate Nearest Neighbors, 

Revisiting the Inverted Indices for Billion-Scale Approximate Nearest Neighbors


Dmitry Baranchuk1,2, Artem Babenko1,3, Yury Malkov4
1 Yandex
2 Lomonosov Moscow State University
3 National Research University Higher School of Economics
4 The Institute of Applied Physics of the Russian Academy of Sciences
Abstract. This work addresses the problem of billion-scale nearest neigh- bor
search. The state-of-the-art retrieval systems for billion-scale databases are
currently based on the inverted multi-index, the recently proposed generalization
of the inverted index structure. The multi-index provides a very fine-grained
partition of the feature space that allows extracting concise and accurate short-
lists of candidates for the search queries.
In this paper, we argue that the potential of the simple inverted index was not
fully exploited in previous works and advocate its usage both for the highly-
entangled deep descriptors and relatively disentangled SIFT descriptors. We
introduce a new retrieval system that is based on the inverted index and
outperforms the multi-index by a large margin for the same memory consumption and
construction complexity. For example, our system achieves the state-of-the-art
recall rates several times faster on the dataset of one billion deep descriptors
compared to the efficient implementation of the inverted multi-index from the FAISS
library.
FLANN - Fast Library for Approximate Nearest Neighbors

FLANN is a library for performing fast approximate nearest neighbor searches in


high dimensional spaces. It contains a collection of algorithms we found to work
best for nearest neighbor search and a system for automatically choosing the best
algorithm and optimum parameters depending on the dataset. FLANN is written in C++
and contains bindings for the following languages: C, MATLAB, Python, and Ruby.

ArrayFire is a general-purpose library that simplifies the process of developing


software that targets parallel and massively-parallel architectures including CPUs,
GPUs, and other hardware acceleration devices.

Several of ArrayFire's benefits include:

Easy to use, stable, well-documented API


Rigorously tested for performance and accuracy
Commercially friendly open-source licensing
Commercial support from ArrayFire
Read about more benefits on arrayfire.com

ArrayFire provides software developers with a high-level abstraction of data which


resides on the accelerator, the af::arrayobject. Developers write code which
performs operations on ArrayFire arrays which, in turn, are automatically
translated into near-optimal kernels that execute on the computational device.

ArrayFire is successfully used on devices ranging from low-power mobile phones to


high-power GPU-enabled supercomputers. ArrayFire runs on CPUs from all major
vendors (Intel, AMD, ARM), GPUs from the prominent manufacturers (NVIDIA, AMD, and
Qualcomm), as well as a variety of other accelerator devices on Windows, Mac, and
Linux.

You might also like