Tag Archives: long-term

Example URL links of long term mean reverting strategy code with Ernie Chan


Notes on Ernie Chan lomg term vs short term coding

cointegration diverges between pairs over long term while co-relation comove in same direction
cointegration is long term and about price
correlation is short term and about returns
basic mean reversion strategy bollinger bands -> enter into position only when price deviates by more than a std deviation and exit when price reverts
consider commission fees to stay profitable

More helpful links while researching



Machine learning in trading: Predicting multiple trade outcomes using a linear regression model

FX-Trader Magazine Article: Function based trailing stop mechanisms






very useful


Lots of Python code examples


Half life test mentioned in Ernie Chan’s video above

View at Medium.com


View at Medium.com

Complete pairs trading example

View at Medium.com

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Next generation crypto alt coin outperform long term vs bitcoin and major market assets

Next generation crypto alt coin outperorm long term vs bitcoin and major market assets

For today, new generation crypto all coins are doing pretty decent still. Not as great compared to last month but still outperforming. I am starting to think Bitcoin should no longer be the speaking voice of all crypto currencies.

The VIX is still to high to show no clarity in the markets. What does the mean? It might show the market sentiment may see a drop which will be most likely news or macro event new driven down.

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Long-term return forecasts 2018

Long-term return forecasts 2018

Quantlabs is pleased to be partnering with Savvy Investor, the world’s leading knowledge network for institutional investors. You may wish to consider joining their platform – it’s entirely free.

“Expected” returns across the world’s major asset classes

Long-term return forecasts are key inputs into many asset allocation models. Here we’ve listed some of the top papers, published in the last few months, which provide long-term return expectations for the main asset classes.

At the end of the list, we’ve included a few papers that examine longer-term themes, such as secular trends, demographic drivers and disruptive technology.

2018 Long-Term Capital Market Expectations (Franklin Templeton Investments)
(EMEA only)
In their 2018 Long-Term Capital Market Expectations paper, Franklin Templeton uses forward estimates of economic data (not just historical performance) to generate return expectations over a time frame of the next 5 to 10 years.

Five-Year Expected Returns 2018-2022: Coming of Age (Robeco, Sept 2017)
Robeco forecasts their 5-year expected returns for all asset classes, focusing on boad trends such as secular stagnation, volatility, passification, the Eurozone, and the origin of returns.

Five-Year Outlook 2018-2023 (BMO Global Asset Management, Dec 2017)
BMO’s Five-Year Outlook considers scenarios and opportunities relevant to investment managers, including themes such as demographics and labor supply, populism, innovative technology, and the global economic outlook.

SSGA Long-Term Asset Class Forecasts, Nov 2017
SSGA combines their assessment of economic growth, inflation, current valuations, and risk premia in order to generate their long-term total return estimates. Short-term forecasts from tactical asset allocation models are also included.

Long-run asset class performance: 30yr return forecasts (2017-46) Schroders
Schroders presents their 30-year return forecasts for a host of asset classes. Their methodology is based on a series of building blocks and estimates of risk premia. Also included within are country-specific return expectations for Asia.

2018 Long-Term Capital Market Assumptions (JP Morgan AM, Oct 2017)
This 2017 edition of JP Morgan’s Long-Term Capital Market Assumptions report explores secular themes such as technology, demographics, and cyclical factors that they expect to influence returns over the next 10 to 15 years.

Capital Market Assumptions (BlackRock, Nov 2017)
In this quarterly update, Blackrock describes its Capital Market Assumptions as of November 2017, having updated their five-year capital market assumptions after recent gains in asset values.

Long-term return forecasts 2018 – diminished expectations (Deutsche AM, 2018)
(UK only)
This paper describes Deutsche Asset Management’s proprietary return assumptions over the long run, covering fixed income, equities and alternatives.

SSGA Long Term Smart Beta Forecasts, Sept 2017
In order to generate their long term smart beta forecasts, SSGA derives excess return expectations from current factor valuations and return premiums on a historical basis, then combines this info with equity total return forecasts.

The Rationale for Investing in Secular Trends (Robeco, 2017)
A good story on its own does not translate into a solid investment strategy. Herein, Robeco establishes a trend investing philosophy by laying out a conceptual and analytical framework for trend investing that moves beyond story telling.

Institutional Investment: Short-term thinking on the rise? (Franklin Templeton)
(EMEA only)
Franklin Templeton discusses results of a comprehensive survey on how institutional investors are adapting to market conditions such as technological disruption, demographics, political instability, regulatory change, and lower yields.

Long-Term Thinking: Demographic drivers (LGIM, June 2017)
(Not available in USA/Canada)
Demographic factors are shifting towards disadvantageous territory, with the global labour force declining, fewer births, and increased retirement age populations. LGIM derives long-term views from these global demographic trends.

Back to long-term investing in the age of geopolitical risk (Amundi, Dec 2017)
Amundi presents their analysis of a survey of pension plans on the topic of how to cope with a variety of geopolitical and economic risk factors, while still managing assets with a long-term mindset.

Longer Term Investments: Automation and Robotics (UBS, 2017)
UBS discusses recent trends and the outlook for factory and process automation, industrial software and 3D printing, as well as commercial drone and AI.

About Savvy Investor

Savvy Investor is the world’s leading resource hub for the institutional investors. Since launch in March 2015, more than 25,000 members from across the globe have registered for the site, with 200 new members joining every week

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Quantopian with Python have a long term future?

So me and a friend were sitting around talking about cloud solutions for trading. The question that came up was how does Quantopian make money. After some digging around I found out they are relying on profit from this alternative hedge fund they want to start through their community. It does not seem to be professionally planned with no real vision. I also dug around to see what people thought of the service which is also limited to only US equity and ETFs. To be honest, I question how they can call themselves quants when many quants don't really focus on these asset classes. On top of that, I wonder if their primary investors will see their $24 million back in seed capital. Go here to see my views on it.

As some of the more legacy languages like Java are proving themselves long term, I'm pretty focused on C and C++ for now. But I thought I would put out two articles describing how Java still has potential while R is good but still has some major issues. 

PS. I am also introduced my ‘Bargain Harold’ pricing for the Quant Elite Membership. In summary, it is 1/15 of the previous price. 
Holy Intro to the Bargain Harold Sale to be an Elite Quant

Yes it is near rock bottom pricing. Try 1/15th of the previous price!
--> GO here to sign up <--
Or here for actual details 
NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Does Quantopian with Python have a long term future?

Does Quantopian with Python have a long term future?

This service is really in a bad long term situation. They raise $24m (I think) of capital but still not profitable and still debating this hedge fund pool direction they want to go:

People seem to bicker about how to do it. From my POV, this will not work but worst is the liability of lawsuits of any algos that go off the rails. Many nutbars using that service who fail will blame them so lawsuits fly. Lawyers are very expensive win or lose.


On Trust


pls. many real traders will not upload their secretive algo IP to these services no matter what the founders and management say.

This ain’t a good headline but I am sure their investors are fully aware of this:


So what happens when their community loses confidence and abandons ship?

Maybe that is already happening:





The best part? One of their ‘VPs’ says Ernie Chan is using it. I can vouch that Ernie Chan does not even use Python at all so I don’t know what kind of dope they smoke in Boston. Also, he only teaches in R but works only in Matlab with live trading in C#.

Also, let’s not address the splinter between Python 2.7 and whatever current version there is. Have fun boys and girls.

You decide on their fine folks

P.S. MOST IMPORTANT. We have NOT mentioned you are only limited to US equities and ETF asset classes. And you call yourself quant with that that limit of asset classes? I would be insulted but the quant newbie and wannabe sheeple will be ok wtih that.

Join my FREE newsletter for your trading with your own source code and control 


NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!					

More long term trading success vs failure?

More long term trading success vs failure?

So I sent this out yesterday:


I got a response via someone in my newsletter:

Bryan, this is very moving statement. I’m confident that the community you created will support you in  many future successes and few failures.

I think we will have more failures at the beginning which hopeful long term success after our initial testing. This is usual but this is the real reason why i will start betting instead of trading. We call it baby steps instead of going big in the outset to potentially blow out your account early. Let’s hope I am right for the long term successes.

Join my FREE newsletter to learn more about these long term trading goals 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Having discipline in your risk management for long term trading for profit

Having discipline in your risk management for long term trading for profit

When you take spread trades, you will naturally take out some market risk via hedging.

There are set of parameters you can use to protect your downside.

You could use gross exposure limits. If you fund a retail brokerage account of $10K which becomes margin which is collateralized against your losses. If you gain $1k, you are now at $11k. Large cap stocks will allow 10x the exposure on what is in your account. You need to find the sweet spot with the maximum your broker allows. If you have 100x on a forex account which could $25kx100=$2.5m. If you lose 1% of it, you are technically blown out by the broker. Never ever receive a margin call from your broker. Set max exposure rate of 1-10x on large cap and 7-8x on a forex account. Commodity is 5-6x. You will never receive a margin call at these rates.

For example, a 100K with 25K deposited and 5% return. After exposure goes up 4x, 100K exposure on 8-10 positions with 25% cushion. If margin goes up to 30k, you can expose at 5x with total 150k on 10-12 positions. You need to increase your risk and diversity on portfolio. You increase your exposure as you improve to be more profitable. Your risk goes down as your portfolio becomes more diverse with a few more positions on each iteration. You need set up an upper limit with a upper limit of the exposure to apply. Your volatility of the portfolio will go up in the long run. In a pure long/short S&P 500 portfolio, never go beyond 6x exposure. A Standard Deviation 2 could knock you back to the start. If you add forex, the mix of the portfolio changes thing. After 2nd iteration, you want to ensure you add the right mix of forex, equity, and commodity so each month you get a nice return to rapidly build you portfolio. You could double your money after 1 year if you keep your exposure 5x with 25% annual return. You should add another 25K in 2nd second with another 50k added in third year. This can only be done when you when cut your losers fast and run the winners. with discipline in mind. Retail traders will pretty well break even at best.

For net exposure limits with cash. Put a net limit of 50% on the initial funded account. Net exposure =long exposure – short exposure. YOu have a positive net long exposure position which means you have a positive view on the market. WHy not just get a S&P 500 ETF? If you have a negative net exposure limit, you short with a negative view of the market. You have accepted market risk. This prevents you from having a huge improper risk on the market. Put a limit of 25% possibly on this for market view.

Beta hedge view: Stock beta value is the amount the stock moves historically give 1 unit move in the market. To hedge out market risk, take beta ratio of long divided by beta ratio of the short which will give you a beta of the spread.

Beta hedging can be calculated on historical prices with multi periods. You may not be successful all the time since it based on historical values which means it change. This will result in portfolio losses but could be a reason why. Beta changes can impact forecasting of sophisticated models. Other risk management parameters are also needed as well.

These risk management parameters will dictate how your portfolio will be structured. This an extra important reason why automated trading works better since you are not really trading like a human.


NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

See our Long term constant Profitable trading foundation and psychology blueprint for a retail trader

See our Long term constant Profitable trading foundation and psychology blueprint for a retail trader

This is easily the most important video I have ever done out of the 700!


Long term constant Profitable trading foundation and psychology blueprint for a retail trader

This is probably the most important video and Powerpoint presentation I could do for newbies, failed traders, non techies, or anyone else interested in this topic.
See more

I cover the 3 lost tips that you need in your trading framework plan to stay profitable over the long term:
1.    Current World view
2.    Idea generation
3.    Screening
4.    Risk management

So go ahead and watch to learn how I plan to move ahead with my future!

I just released a video last week explaining where the most advanced trading education exists.

What is the most advanced trading education in the world for profit ?

Watch our video to see how our education is different

If you are interested in learning more about our future alert service, join here.

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!