8
votes
Programmatically detect RSI divergence
I was searching for answers to the same question and came across your question.
After some thought and research, here is the plan I have developed. I will be working in Python.
Calculate relative ...
6
votes
What's the rationale behind having several orders on each each side for market makers
I've read this question and the other question you asked and I hope I can help.
The important thing to realize that in any market multiple market makers operate and they are all trying to optimize ...
4
votes
Accepted
Neural Networks for Estimation of Unmarked Private Asset Returns from Market Data
Based on an my updated understanding of your problem you have a portfolio consisting of $N$ illiquid assets. Valuations are not real time and usually lagged, by say, upto 3 months (or slightly longer),...
3
votes
What is the formula to calculate Implied Volatility Percentile
As volatility has a great influence on option prices, you'd like to sell options in high volatility environments and purchase options in moments of low volatility. But what is high/low volatility? ...
3
votes
Accepted
Applicability of AAD(Adjoint automatic differentiation) to an indifferentiable function at some point
In 2017, I organised a Mini-symposium on automatic differentiation and its applications in the financial industry to share thoughts with other academics on the way AAD could be applied to financial ...
3
votes
Fastest algorithm for calculating retrospective maximum drawdown
In Python, a very slick implementation that exploits the rolling functionality in pandas is like this
...
3
votes
Genetic Algorithm - Portfolio Optimization / Index Tracking crossover process
Genetic Algorithms are typically used to pick the subset of securities used in the final portfolio, so you would crossover the stocks. You wouldn’t crossover the stock weights because, as you point ...
3
votes
Online algorithm for calculating EWMA at irregular intervals?
The above code for an irregular EWMA doesn't quite give a half-life - the code is missing the $e^{\ln(.5)}$ term found in the preceding formula. To get a true half-life, the code should look like ...
3
votes
Accepted
How to (efficiently) calculate the maximum possible return of a perfect "crystal ball" investment strategy?
This answer seems to be wrong. Please read the edit and the comments.
To me, that smelled like dynamic programming too. After implementing a dynamic programming solution according to http://www.cs.rpi....
3
votes
Programmatically detect RSI divergence
I want to implement exactly same principle in C# and realized that i should start opposite. Start from finding Higher High or Lower Low and then checking RSI. After finding HH or LL checking RSI is ...
2
votes
Comparing account equity vs maintenance margin on large number of positions
I don't actually know the answer to this question but the problem you describe is just a linear algebra problem. Imagine a matrix X whose rows represent the ordered ...
2
votes
Accepted
Algorithm for calculating Capped Index weightings
I figured it out! See the second tab of my spreadsheet for the solution.
And for what it's worth, here's my Java code. No recursion needed!
...
2
votes
Backtesting algorithms
In this blog post I describe how to backtest trading strategies with R:
Backtest Trading Strategies Like a Real Quant
It gives a step-by-step template which consists of the following steps:
Load ...
2
votes
What are known algorithms to detect potential wrongdoings in funding distribution?
You could start with the law of anomalous numbers: Benford's Law. I'm not sure if it is the exact answer you are looking for, though it has been used in many forms to detect anomalies within financial ...
2
votes
Accepted
What does it mean to "compute" an Itô integral?
Note that SDE (4) does have a "closed-form" representation.
Let $X$ be
$$X := S^p, $$
so (4) is a geometric Brownian motion SDE
$$dX = (p\alpha + 2^{-1}p(p-1) \sigma^2) X dt + p \sigma X dW,...
2
votes
How to Manage Large Orders
Most institutional brokers, and certainly prime brokers, offer a range of automated execution strategies. You can check out the list of algos supported by IB to get started. The basic algos split ...
2
votes
Accepted
Weak Stationarity for Neural Network Input?
Yes, it is essential to ensure that your time-series exhibit atleast some form of stationarity for predictive time-series based ML models.
When estimating a Neural Network (NN) or other machine ...
2
votes
Accepted
Forex data API endpoint that provide last closed candle's HLOC
You can use Oanda's Rest-V20 API to achieve what you want, although you'll need to open either a Live or free Practice account and get an access token to do so.
I've been using this API for years now ...
1
vote
Algorithm for Identifying NDF FX Trades as Buy or Sell
I had a look at the data and produced this chart:
When you see all these trades it is clearly difficult to know if a buyer or a seller initiated it.
moreover, I had a look at the columns
Event type: ...
1
vote
Calibrating the Heston with the Levenberg-Marquardt algorithm
The situation is a little more complicated than expected. We use this notation for the damped least squares equation
$$
[J^{T}J + \lambda I_{d}] \Delta \theta = -\nabla f(\theta)
$$
where $\theta$ is ...
1
vote
Implied volatility is returning infinity
Assume we are in the Black Scholes for call option settings, and let’s ignore the dividend. For the implied vol, we can treat all other variables as constant, and focus on the price of the call option ...
1
vote
Accepted
Custom normalisation from 0 to 20
Essentially you are creating a mapping, or a function here.
In the first instance you had a maximal score of 10, and you mapped as follows:
$$f(volume) = \left \{ \begin{matrix} 10* volume/200, \...
1
vote
Spectral clustering in finance
One spectral analysis technique involves decomposing a univariate time series using SVD, assigning eigenvectors to two or more groups with k-means or another clustering algorithm, with the least ...
1
vote
Accepted
The quality of an trading algorithm
As regards a commentary made by another user, the Sharp Ratio is not a standalone measure because it requires the selection of a benchmark rate of return. While it is common practice in financial ...
1
vote
What are common risk controls banks use when utilizing Trading Algorithims
There's 2 different types of risk controls that you're referring to.
The first class (for execution algos) is at a regulatory level and has to do with broker dealer requirements mandated by rules ...
1
vote
How to apply the "Knapsack Problem" to minimise a portfolio's volatility?
If you're happy with equal stock weightings, then this can certainly be done iteratively. I don't know of any closed-form equation. It works for a universe of 100 stocks, but the calculations ...
1
vote
Fastest algorithm for calculating retrospective maximum drawdown
I use a quick and dirty C++ solution:
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
algorithm × 75algorithmic-trading × 17
programming × 9
optimization × 8
quant-trading-strategies × 6
time-series × 5
trading × 4
arbitrage × 4
market-making × 4
pairs-trading × 4
indicator × 4
fx × 3
modern-portfolio-theory × 3
quants × 3
volatility × 2
black-scholes × 2
fixed-income × 2
equities × 2
portfolio-optimization × 2
portfolio-management × 2
monte-carlo × 2
data × 2
backtesting × 2
high-frequency × 2
machine-learning × 2