Skip to main content

Questions tagged [algorithm]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
59 votes
9 answers
35k views

How useful is the genetic algorithm for financial market forecasting?

There is a large body of literature on the "success" of the application of evolutionary algorithms in general, and the genetic algorithm in particular, to the financial markets. However, I feel ...
Graviton's user avatar
  • 1,261
36 votes
6 answers
40k views

How to identify technical analysis chart patterns algorithmically?

I'm working on a small application that will provide some charts and graphs to be used for technical analysis. I'm new to TA but I'm wondering if there is a way to algorithmically identify the ...
miggety's user avatar
  • 669
28 votes
9 answers
6k views

How good is managed code for algo trading?

I am currently working in a firm that does algo trading. We do all of our stuff in Java. And we do make money out of it. We have debates all the time whether we would have made more money with native ...
Bick's user avatar
  • 613
27 votes
8 answers
5k views

What kind of basic framework or application do you use to run your trading algorithms?

I heard about MetaTrader from http://www.metaquotes.net. Is there any other framework or program available? Do you use different software for backtracking and running your trading algorithms? Thank ...
25 votes
1 answer
10k views

Algorithm to fit AR(1)/GARCH(1,1) model of log-returns

I am fitting numerically an AR(1)/GARCH(1,1) process to index and stock log-returns, $r_t=\log(P_t/P_{t-1})$, where $P_t$ is the price at time $t$, and thus far am not clear on where the observed log ...
user avatar
20 votes
2 answers
972 views

How do you distinguish "significant" moves from noise?

How do you distinguish between losses that are within the normal range for day-to-day shifts and situations with a real potential for loss? The specific application I have in mind is pattern ...
monksy's user avatar
  • 766
16 votes
8 answers
19k views

Fastest algorithm for calculating retrospective maximum drawdown

Simple question - what would be the fastest algorithm for calculating retrospective maximum drawdown ? I've found some interesting talks but I was wondering what people thought of this question here.
jbmusso's user avatar
  • 301
15 votes
3 answers
12k views

Which algorithms do robo-advisors use?

Some pundits claim that there is a revolution in portfolio management under way: The rise of the robots, a.k.a. robo-advisors. The most well known are Betterment.com, FutureAdvisor, Schwab Intelligent ...
vonjd's user avatar
  • 27.5k
14 votes
2 answers
2k views

Algorithm for the choice of stocks for a equity scalper/market maker to engage in?

Assume a scalper/market maker who is operating on an exchange with $N$ stocks with different characteristics such as current market value, average bid-ask spread, average daily volume and historical ...
knorv's user avatar
  • 2,119
12 votes
0 answers
3k views

Volatility-Based Envelopes

I am following an article by Mohamed Elsaiid (MFTA) about Volatility-Based Envelopes - a quite new technical indicator he has introduced, that is being used by Bloomberg. My goal is to get a simple ...
Bach's user avatar
  • 449
11 votes
3 answers
16k views

Programmatically detect RSI divergence

How can I programmatically detect bullish and bearish RSI divergences? A bullish divergence occurs when the underlying security makes a lower low and RSI forms a higher low. RSI does not confirm the ...
SpiralDev's user avatar
  • 219
10 votes
5 answers
655 views

Is there a name for, or any research on, a system where you try to predict future price by finding a similar price history in the past?

Allow me to explain. You look back from some period to the present. Say a week ago to now, using a per-minute view. You then crawl through your database of past price data, and you try to find a ...
ryeguy's user avatar
  • 201
10 votes
1 answer
1k views

Kalman Filter Vs Hough Transform

These questions are in regards to the Kalman filter and the Hough Transform. What are the Pros and Cons of using each method? In what situations is it better to prefer one over the other?
pyCthon's user avatar
  • 2,121
9 votes
2 answers
7k views

Quantitative Finance Programming Language

Since couple of weeks, I started to do my research on quant finance. During this time, I could discover a lot of stuff and with that stuff, a lot of questions came to my mind. A lot of news or ...
Speakard's user avatar
8 votes
5 answers
4k views

Thoughts on how quantitative hedge funds use machine learning to invest in the stock market (algorithms, examples of data, etc.)

I believe there are several post on this general topic but I thought I would start my own thread. I'm a former fundamental hedge fund investor (i.e. modeling a company's financials, forecasting the ...
Alex's user avatar
  • 81
7 votes
2 answers
1k views

Algorithmical replication of a profit and loss function using different options

I often see questions like "Given this payoff graph (example below), construct a portfolio that replicates it." I want to know if there is an efficient method/algorithm to find the individual pieces ...
wrt's user avatar
  • 73
7 votes
3 answers
580 views

Means of inferring trading algorithms from competition trade data

I'm analyzing trades from several participants in a trading competition, and I was wondering - are there known mechanisms for analysis and inference of the logic in a set of trades done by one ...
Dmitri Nesteruk's user avatar
5 votes
3 answers
2k views

Searching for pairs-trading in sub O(n^2 t) time

Let there be $n$ stock symbols. Let each stock symbol have exactly $t$ ticks (with all ticks miraculously aligned.) We are now searching for potential pairs for pair trading. A brute-force solution ...
user avatar
5 votes
1 answer
3k views

What is the pseudo code for a pairs trading strategy?

I am trying to learn about pairs trading strategy. I know that we have to long and short cointegrated assests simultaneously. But I still have some confusion in how the strategy works. I wrote the ...
Eka's user avatar
  • 647
5 votes
3 answers
2k views

How to apply the "Knapsack Problem" to minimise a portfolio's volatility?

Suppose I have a stock selection universe of 100 stocks. I have estimated the covariance matrix of this 100 stocks. I would like to create an equaly-weighted basket of 5 stocks which has the lowest ...
user847663's user avatar
5 votes
1 answer
1k views

What are some applications of bioinformatics or genetics to generating alpha in U.S. equities?

There are many disciplines that have contributed to how one model's risk and return. Physics introduced Brownian motion and RMT. Machine learning has helped to solve complex portfolio construction ...
Ram Ahluwalia's user avatar
5 votes
1 answer
677 views

How to (efficiently) calculate the maximum possible return of a perfect "crystal ball" investment strategy?

I am new to the world of investing, so please excuse the clumsy wording of the question... there is probably a better term for what I am looking for or maybe this is even a known/classic problem. If ...
KlaasNotFound's user avatar
5 votes
1 answer
1k views

Calculating most profitable arbitrage orders on multiple market with fixed and variable fees

If I have multiple markets (let's say 5, but the solution should be generic) trading the same stock/commodity/whatever, and the markets differ in both variable fees (which are in % of the trade order) ...
Paya's user avatar
  • 355
4 votes
1 answer
163 views

Neural Networks for Estimation of Unmarked Private Asset Returns from Market Data

Let's assume it is March and my illiquid private assets portfolio is only 50% marked for 12/31, but I want to get the most accurate estimate of my final return for the quarter ended on 12/31. What is ...
Alexis Olson's user avatar
4 votes
1 answer
72 views

What are known algorithms to detect potential wrongdoings in funding distribution?

Imagine an entity with a money fund. This entity defines some budgets which it annually distributes to different applicants. Example data set: ...
J. Doe's user avatar
  • 141
4 votes
1 answer
3k views

How does Hanson's Market Maker (LMSR) work?

Implementing Hanson's Market Maker states: If the market maker wants to quote a "current price", he can. The current price for outcome 1 is: $$ \mbox{price1} = \frac{e^{\frac{q1}{b}}}{e^{\frac{...
user997112's user avatar
4 votes
0 answers
785 views

signal processing + finance? [closed]

I am a postgrad student doing a master in Signal Processing and I have graduated from an engineering school I was wondering if there are any jobs in finance that are opened to people having this kind ...
lezebulon's user avatar
  • 185
3 votes
2 answers
220 views

How to simulate one-minute bars data from one-day bars?

I need to generate one-minute bars out of one-day bars to test the performance of an algorithm (speed, memory usage, etc). I don't need them to resemble real data, but they should be consistent with ...
Victor's user avatar
  • 1,210
3 votes
1 answer
1k views

What's the rationale behind having several orders on each each side for market makers

I've been browsing market making codebases and I've noticed most of them tend to create multiple orders on each side. Originally I thought having orders on each side is an advanced approach but here'...
SiberianGuy's user avatar
3 votes
1 answer
3k views

Home/hobbyist quant trading - possible to profitable or just an intellectual hobby? [closed]

I've been researching algorithmic (non discretionary) trading at the several-day to month timescale, i.e. not HFT. I am not interested in voodoo i.e. no technical analysis, I am looking for solid ...
nxstock-trader's user avatar
2 votes
2 answers
508 views

Backtesting algorithms

Are there any books/papers/articles to describe how to develop a backtesting software? Something like backtest in quantopian website. How do they calculate the Cumulative performance?
Tester's user avatar
  • 121
2 votes
1 answer
4k views

What is the formula to calculate Implied Volatility Percentile [closed]

I googled and I am unable to find any formular . Can some one give me the formula to calculate IVP , based on sets of IV's given. Thanks.
Gracie williams's user avatar
2 votes
1 answer
498 views

Applicability of AAD(Adjoint automatic differentiation) to an indifferentiable function at some point

Applicability of AAD(Adjoint automatic differentiation) to an indifferentiable function at some point. I recently learned about Adjoint automatic differentiation(AAD) while studying Monte Carlo ...
junhui's user avatar
  • 23
2 votes
2 answers
816 views

Algorithm for calculating Capped Index weightings

I'm trying to build a Capped Index Fund of crypto currencies. As Investopedia explains, a "Capped index is an equity index that has a limit on the weight of any single security. Thus, a capped index ...
Corey's user avatar
  • 41
2 votes
1 answer
319 views

Fastest algorithm for extracting 25% and 75% marks

I'm hand rolling some visualization algorithms. Extracting the min/max of a time series is $O(n)$, for n entries. If I want the 25% and 75% mark, I could use an $O(n \log n)$ time sort, then get the ...
user avatar
2 votes
1 answer
139 views

What are common risk controls banks use when utilizing Trading Algorithims

Trying to understand what risk controls are used for algorithms that are classified as a) execution algos such as twap, vwap b) market making algos such as auto pricing, inventory management, auto ...
Alec's user avatar
  • 21
2 votes
0 answers
176 views

How to backtest algorithms in parallel?

I want to backtest a large number of algorithms on the same dataset, one stock ticker. The algorithms are actually variations of one algorithm with various combinations of parameters, amounting to ...
Gascoyne's user avatar
  • 527
2 votes
0 answers
155 views

Efficient construction of binomial tree

The goal is to build a $n$ step binomial tree knowing the end nodal probabibilities $p_1, \dots, p_m$, which correspond to the time $T$ states $S_1, \dots, S_m$. We assume that all paths ending in the ...
Phun's user avatar
  • 624
2 votes
0 answers
333 views

TA/Pattern algorithm analysis [closed]

I have been building a momentum pattern detection algo (essentially involves fitting curves in overlapping windows at different timeframes) and wanted to see if anyone has done/seen similar work. I ...
fooledbypattern's user avatar
2 votes
1 answer
362 views

accumulation/distribution and options to create excessive position to hit the tape with later

I am curious about possibilities and theory here. Basically a "problem" with trying to get large positions is that it would move the market in the direction that you are loading up on, therefore ...
CQM's user avatar
  • 1,862
1 vote
2 answers
179 views

Controlling portfolio concentration

I'm working with a heterogenous basket of instruments (in volatility terms). Risk parity allocation seems to be useful for the portfolio( * 1/Volatility). However, there are times when the ...
Mindstorm's user avatar
  • 305
1 vote
2 answers
3k views

Online algorithm for calculating EWMA at irregular intervals?

What is a fast online algorithm for calculating the EWMA (exponentially weighted moving average) of an input variable observed at irregular intervals? I know the formula for when sampling at regular ...
Steve Lorimer's user avatar
1 vote
2 answers
948 views

Importance sampling for barrier option like pricing by Monte carlo

I would like to know some references regarding importance sampling algorithms for variance reduction of Monte Carlo barrier options pricing. Please could someone help me leaving some references? If ...
Paul's user avatar
  • 608
1 vote
1 answer
152 views

Literature on credit risk premia

I am looking for a comprehensive ressource describing known strategies of credit risk premia. Is there such kind of articles/books/websites?
mic's user avatar
  • 281
1 vote
1 answer
304 views

What does it mean to "compute" an Itô integral?

I'm reading Shreve's Stochastic Calculus for Finance II. On page 191, Exercise 4.6, we are given the problem Exercise 4.6. Let $S(t)=S(0)\exp\Big \{\sigma W(t)+(\alpha-\frac{1}{2}\sigma^2)t\Big\}$ be ...
user54908's user avatar
  • 437
1 vote
1 answer
210 views

How to Manage Large Orders

Forgive me for any violations of posting rules, I’m new to this forum. I’ve written an algorithm that checks the order book for the price point that would completely fill my entire available balance, ...
Kyle Dixon's user avatar
1 vote
1 answer
39 views

Comparing account equity vs maintenance margin on large number of positions

Forex brokers will start liquidating your positions when your account's equity falls below the maintenance margin set by the broker. ...
HubbyDubDub's user avatar
1 vote
2 answers
294 views

Spectral clustering in finance

What are some examples of applying spectral clustering to financial times series data or other areas of finance? Why spectral clustering was used for each application rather than other types of ...
develarist's user avatar
  • 3,000
1 vote
1 answer
668 views

Memory-efficient clustering algorithm for large time-series datasets

I have a simulation task at hand with ~1e6 time series to be clustered on the basis of statistical measures every few days in the simulation. Most clustering methods I'm aware of require an affinity ...
Mindstorm's user avatar
  • 305
1 vote
0 answers
168 views

Calibration of $\rho$ in the heston model

When calibrating the Heston model, the gradient of the price of the call/cost function wrt $\rho$ (correlation between $S$ and $V$), is a lot less than the other parameters like $v_0$ and $\bar{v}$. ...
THATS MY QUANT MY QUANTITATIVE's user avatar