26 May 2018
Tayloe Draughon

Tayloe on Fintech and Regtech

Tayloe Draughon - CloudQuant

31Posts 166,308Views 20Comments
Fintech innovation and startups

Fintech innovation and startups

Disruption, destruction, harmony and creation; Fintech’s new frontier – a place to discuss the cutting edge of innovation.

My First Algo in Python

01 May 2017  |  5232 views  |  0

Last week I mentioned my efforts to produce an algorithm on CloudQuant.com. As a reminder, they are a strategy incubator that provides historical data going back to 2011. If you can produce a trading or investment strategy that produces decent results they will license the algo from you and pay you a portion of the profits from that strategy. You don’t have to provide any capital; they provide it.

I used a well-documented strategy as defined in Jason Perl’s book “DeMark Indicators” (ISBN 978-1-57660-314-7 Bloomberg Press, New York 2008). The strategy is a Bearish TD Sequential Flip. This strategy is a basic technical strategy that utilizes bar data. CloudQuant lite, the default version, provides one minute bars. CloudQuant provides access to much more granular data on other versions of the data simply by requesting to be upgraded. For my purposes, and the purposes of this strategy the 1 minute bar data is perfect.

The idea behind the strategy is to predict when a series of down bars indicate a time to buy. One hopes to buy low!

The first component of the strategy is the “TD Bearish Price Flip.” The bear flip occurs when the close of a bar is greater than the close 4 bars earlier immediately followed by a close less than 4 bars earlier.

The second component is a countdown. The countdown gives a buy indication when an uninterrupted series of 9 closes occurs with each close being less than the close 4 bars earlier.

Once we have the bear flip followed by a countdown of an uninterrupted series of 9 then I submit a buy at the market for that stock.

This gets me into the position. To get out of the position I want to take profits or losses quickly. The strategy takes a profit at $0.15 per share and stops any losses at $0.30.

If all this sounds complicated, it really isn’t. All told there are only about 60 lines of code written in Python. Python is easier to write than excel macros. There are more comment lines explaining what I was doing than lines of algo code.

After back testing the strategy the results were mixed. Some losses, some winners. Nothing spectacular. The algo won’t likely get funded as written.

The team at CloudQuant helped me out and placed the algo into their public scripts so that anyone can clone it and run the same tests. Better yet, you can use it as a foundation to start your own algo.

Here are some ways that you might want to consider to improve my performance:

  1. Do a data study to optimize the target price for loss and profit taking.
    1. Do a data study to see if there is a max period of time that you should hold a position.
    2. Utilize other data other than just the close price in each bar
      1. Does the BarView open, high, low affect the success rate?
      2. Does the bidvol, or askvol affect the success rate?
      3. Does the vwap affect success rate?
      4. Does the spread between bid price and ask price change with success rates?
  2. Read the DeMark indicator book and apply more of the techniques past page 3 :)
  3. Change the bar length to see if you can do this as a different time length
  4. Use a data driven approach to pick which stocks to run this algo upon
  5. Are there times of day approaches that would work better? Do the study.
  6. Does this strategy work for a market that is trending up or down better?
  7. Does this strategy work better for market capitalization size?

10.  This is implemented as a buy (long only) strategy. Implementing the sell short strategy could improve the returns.


TagsTrade executionInnovation

Comments: (0)

Comment on this story (membership required)

Latest posts from Tayloe

Algo Trading and Ethics

29 November 2017  |  1137 views  |  0 comments | recomends Recommends 0 TagsArtificial IntelligenceInnovationGroupFintech

Social Sentiment in Trading Algorithms

21 June 2017  |  4318 views  |  0 comments | recomends Recommends 0 TagsTrade executionInnovationGroupFintech innovation and startups

Japan Tightens Regulations on High Frequency Trading: 3 FINTECH Needs

22 May 2017  |  10256 views  |  1 comments | recomends Recommends 0 TagsTrade executionRisk & regulationGroupFintech

My First Algo in Python

01 May 2017  |  5232 views  |  0 comments | recomends Recommends 0 TagsTrade executionInnovationGroupFintech innovation and startups

An Incubator for Trading Strategies

25 April 2017  |  3667 views  |  0 comments | recomends Recommends 0 TagsTrade executionInnovationGroupFintech innovation and startups

Tayloe's profile

job title Senior Product Manager
location Chicago
member since 2016
Summary profile See full profile »
eTrading product manager, technology & FINTECH innovator

Tayloe's expertise

Member since 2015
31 posts20 comments
What Tayloe reads
Tayloe's blog archive
2017 (8)2016 (23)

Who's commenting on Tayloe's posts