Press J to jump to the feed. Press question mark to learn the rest of the keyboard shortcuts

Algorithmic Trading


pinned by moderators
Posted by
Algo/Prop Trader
4 months ago
Moderator of r/algotradingComments are locked
promotedPosted by3 months ago
Comments are locked
Posted by12 hours ago

Edit - Someone else found the answer:

on 20111101 DISH declared a special $2/share dividend payable on 20111201. The ex-date for that 8% dividend was... 20111115. The $2/share drop you saw from the 14th to the 15th was the stock going ex-dividend.

外围体育投注So the stock options (which are American options) were deep in-the-money with a large dividend looming. This is one of the rare cases when early exercise is optimal. If you exercised the options on the 14th, you got that $2 special dividend while if you held the options you lost out on the dividend. The options holders all realized this and exercised.

外围体育投注I bought 16 years of historical hourly stock options data for back-testing my algo. I'm looking at the data for a DISH 1/21/2012 5/2.5c credit spread (yes I know, an absurd position, but due to this weird scenario, the algo flagged it) and this is the weirdest activity I've ever seen unless it's an error on the data supplier's part. Maybe someone who knows the ins and outs of the market better than me can explain what happened here.

Summary at market close:

  • 外围体育投注the options both saw an hour of 52,000 volume

  • 553 bids were made on the $2.5c (open interest)

  • 553 asks were made on the $2.5c (open interest)

  • 外围体育投注550 bids were made on the $5c (open interest)

  • 外围体育投注550 asks were made on the $5c (open interest)

  • both options were deeply in-the-money

外围体育投注At market open the next day, both options died:

Posted by23 hours ago


外围体育投注I've been a long time lurker, but figured I would share what I've been up to for the last few months.

I've been working on a few different strategies (mainly mean reversion/momentum) with different variables/indicators using tick data. After many many many hours of tweaking, I optimized it further by isolating certain days of week / times of day (down to 30 minute windows) that performed the best on average, and it's now only trading those 'successful' windows.

I've been running the below strategy (lets call it strategy A) live for the past 1.5 months and so far results match the backtest. Strategy A works extremely well with high volatility, which is why I'm trying to milk it while I can. :)

It trades in very tight time intervals (average time in market = 13 mins), but is extremely selective about when it takes a trade, so that usually means a few trades per week. This is running on NinjaTrader (I coded it in ninjascript) and is trading 1 ES futures contract at a time. I built in a saftey-net where it halts trading for the day if the unrealized P&L drops below a certain amount, but so far it hasn't hit it.

外围体育投注I'm working on another strategy that performs much better in various market conditions and is backtesting successfully going back 3+ years, but is even more selective about when it executes trades. Because of this, the trades are even more sparse, but with an increased contract count, it performs quite well.

EDIT: There's been some confusion about how much capital I'm using. My broker only requires $1k of margin for every ES contract. Since I started live trading (end of june), I've been using $1.5K USD total and I've only been trading 1 ES contract/order. I've added another chart below outlining what the results would look like if you were to trade 30 ES contracts per order instead of 1 (this would require 30K USD + more for buffer in case of drawdown, so 40-50K to be safe). The liquidity pool for ES futures is very deep, so in theory, you could run this strategy at 100+ contracts/order.


Posted by12 hours ago

外围体育投注Quantopian uses Morningstar data to provide a wide variety of fundemental data and other stats such as growth scores, value scores, growth grades etc. I want to use these score and grades from Morningstar but nothing allows me to port these from quantopian.

For example, Pylivetrader allows you to port your quantopian code to a python environment to trade, but you have to pull fundemental data from another source (if on Alpaca you would pull fundemental data from Polygon). You aren’t able to pull from Morningstar like quantopian can.

My problem is, how can I get access to Morningstar data? I wasn’t able to find pricing on Morningstar data or API. Would be great if I could buy the data and add it to my trading algo on a python environment to really resemble quantopian trading aka use the score and grade data.

Posted by12 hours ago

Let's say I am trading a single security and I have a hypothesis that I should buy on a Daily High and sell on a Daily Low to be profitable in the long run. Note that there are no parameters that require optimization in this case so techniques like Walk Forward Optimization are not required.

Can I simply test against all my data in such cases or do I still need to divide it into in-sample and out-sample?

Posted by18 hours ago

Okay, before you go off at me about "using the search bar", I'm going to tell you that I did. I'm asking here to make sure I've covered everything I possibly can, as the previously asked interview prep questions were a bit more specifically focussed on one or two aspects of the interview process.

外围体育投注I'm currently working in a trading job that is not what I imagined it would be; I'm a few months out of university and I graduated with a pure maths degree and an economics degree. I'm thinking about applying to HFT firms, and I just want to make sure I'm doing all I possibly can to prepare. Thus far, I've been:

  • drilling mental math (this is taking me so long to overcome, I've never been good at this so any tips are appreciated) with arithmetic.zetamac and rankyourbrain (still on easy mode...).

  • 外围体育投注trying to practice sequences (I haven't found many good websites for this, any recommendations are appreciated)

  • 外围体育投注reading Heard on the Street

  • reading Option Volatility & Pricing by Natenburg

  • 外围体育投注I just started The Elements of Statistical Learning as per the recommendations in this sub.

  • Practicing python problems on HackerRank - I don't have a CS background and I'm self-taught in python so I'm not as efficient in writing code as I'd like to be. The maths part of my brain takes over and I tend to do everything from first principles rather than using the libraries available to me.

I'm feeling a bit overwhelmed trying to do all this and my day job, and I guess I'm just here to ask if you think this would cover most things asked at HFT interviews. Also, are there some things you would prioritise learning over others? Thank you in advance.


About Community

A place for redditors to discuss quantitative trading, statistical methods, econometrics, programming, implementation, automated strategies, and bounce ideas off each other for constructive criticism. Feel free to submit papers/links of things you find interesting.




Created Jun 17, 2012

r/algotrading Rules

No Promotional Activity

Content marketing is heavily moderated. If deemed to be of low quality, it will be removed and your user account may be banned. Posts announcing products or services are not allowed. Affiliate marketing is not allowed. We are not a marketing base for you to pitch your service or build a client list... This includes posts that state "PM me for details".

Keep it Professional and Friendly

No insults or attacks of any kind. Abusive posters will be banned. We don't care if they called you names first; report the abuse to us and we will deal with the offending party (getting into a name calling spat will likely just get all parties involved banned.)

No self promotion of your blog, YouTube channel, or your social media (insta, twitter, etc..)

General spirit of this rule: If you're really only posting here to bring attention to yourself or your site, regardless of the context or how "free" the content is, you shouldn't post it here.

No Gain / Loss (P/L) Porn

If you're going to post your account P/L, you must post it with a detailed write-up of how you trade and what went into your performance.

AlgoTrading Links

Related Communities


15,452 members


外围体育投注105,470 members


493,113 members


外围体育投注67,954 members


407,235 members