Back to Community
Free Cash Flow to Enterprise Value with FactSet Data - Template Fundamental Algo

Many of our funded authors have relied upon price driven strategies. As we continue to evaluate and add algorithms to our portfolio, we will be especially interested in new strategies that take advantage of a broader range of fundamental factors.


Free cash flow (FCF) is a measure of how much cash a company has on hand after all expenses are extracted. High FCF indicates that larger amounts of cash are available to the company for reinvestment. By dividing by a company’s enterprise value (EV), we can compute a ratio that shows how cash is generated per unit of the value of a company. In this implementation, we can test the idea that companies with a relatively higher ratio of FCF/EV are likely to outperform companies with relatively lower levels of FCF/EV. Read more here.

As we look to expand the set of algorithms receiving allocations over the next few months we expect to give preference to new ideas that take advantage of a broader range of fundamental factors.

To get started, clone this algorithm, improve it with your own ideas, and submit it to the Quantopian Daily Contest.

N.B. As implemented here, this algo doesn't fully meet all of the criteria for entry in the daily contest so we're leaving that as an "exercise for the reader".

Fundamental Sample Strategies Library

To see all of our fundamental sample strategies, please visit our new library post. We will be adding more templates in the future, so keep an eye on the "Algo Template" tag in the Quantopian forums:

Clone Algorithm
Backtest from to with initial capital
Total Returns
Max Drawdown
Benchmark Returns
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 5bc5f44a662866437201deaa
There was a runtime error.

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

15 responses

Interview with Michael Mauboussin on the merits and pitfalls of using EV/EBITDA multiples (close to the inverse of above FCF/EV yield. I believe FCF = EBITDA + CapEx).

How different this algorithm looks over the 2007-08 period. And specific returns (as calculated by Quantopian at least) are zero over the entire period. Would that I could do further work on the calculation of "specific returns" but the research environment is, alas, not conducive to that.

On a brighter note the Quantopian video Home Runs is well worth watching. Right or wrong the takeaway is that there are a mere handful of factors driving stock prices and that relative simplicity is best. Chris Covington of High Vista talks much sense (in my terms at least). But perhaps that is just my own bias.

Incidentally I rrealise of course that this algo is merely a very helpful example. Nonetheless it is instructive to run it as is out of sample.

The other point which is very evident from these examples is that turnover has to be "manufactured" if the algorithm is to meet Quantopians expectations. Of course it is obvious why they insist on certain turnover levels - they state their point. It is about sample size.

And yet if you are hoping to base your investment on a few simple fundamental factors you are going to have to manufacture turnover by using a ratio which changes daily (like PER) rather that balance sheet extractions which change only once a quarter like debt.

One problem in using ratios such as PER is that they are bound, by definition, to cause ranking by sector. At least in recent years. Tech companies for instance have tended to have high PERs and if you rank high per as a "long" then you will be dominated by tech stocks. The reverse and your choice will be dominated by value.

I am tempted to wonder whether one can in fact have it all in one algo,

One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them

A further question I am led to this morning is: "if it is possible to isolate and ascertain specific return can you build an algorithm to express that specific return and nothing else". If you can not them I am left wondering whether the calculation of specific return is in fact valid. If you can not isolate it in actual trading then I rather doubt that it exists.

Incidentally while my posts sound negative I am in fact wholeheartedly in support of the drive to use "fundamentals" in quantitative investment. Price factors seem dominated by "momentum" - does any other price factor really exist? It would be nice to move away from price and towards fundamental factors. Although of course price will itself reflect the fundamentals in due course.

Price factors seem dominated by "momentum" - does any other price
factor really exist?

“Mean-reversion “ is a price factor as well.

I would add volatility to price factor as well and further say that it's what describes the "intensity or magnitude" of what conditions of momentum and mean reversion are.

The way I look at it is, fundamentals describes an individual company's financial health, performance, stability, size, value, etc. and one can score them accordingly through these various characteristics vis a vis their industry and / or against the stock universe as a whole. Price factors, on the other hand, describes how the company's stock price behaves under the influence of market forces, i.e. price equilibrium of supply and demand.

Yeah, in my opinion you kinda need both. Fundamentals is a great starting point (where I always start anyway), but you don't want to pay too dearly for great fundamentals. As the great Oracle of Omaha has been known to say: "Price is what you pay; value is what you get" and "It's better to buy a wonderful company [great fundamentals] at a fair price, than a fair company at a wonderful price."

In other words, one can't just look at fundamentals in isolation, but always need to look at them in relation to the price I'm paying for them. Note, this is just the way I'm trying to analyze companies - I know it's not the only game in town.

Hi Joakim,

Yes very true, you need both. What you described as your thought process and the quote from the great Oracle from Omaha is the essence of value investing. And you're right to say that it is not the only game in town, most specially with the developments in computing technologies, quantitative techniques and data driven approaches. And I guess this is the exercise we are all undergoing here in Quantopian, to make new alpha discoveries devoid of or away from what has already been commonly known in the trading world.

Hi James,

Yeah, absolutely. I think it can be applied to 'growth' investing too though. One should be able to find 'value' in growth companies as well, if the 'priced in discounted growth rate' is significantly less (i.e. with a 'margin of safety') than one's own estimated (and hopefully actual) future growth rate (e.g. GARP investing).

Regarding ML, I'm very much a novice in this field so please correct me if I'm wrong. Would you agree thought that ML is very good at detecting and acting on 'price patterns' (much better than humans), but that those price patterns can oftentimes be fitted mostly on noise, or on a particular market regime specific to the time-series trained on? So, as I gathered from Ernie Chan's recent webinar, the key to using ML in financial time-series might not be to predict future prices or returns, but to choose non-price related features that may indirectly affect future prices (e.g. using ML to try to predict earnings surprises)?

Also, in your opinion, is 'Reinforcement Learning' one of the better type of ML algorithm for financial time-series?

Yes, Joakim, ML algos are very good at detecting 'prices patterns' but is also very susceptible to overfitting on noise because of the non stationarity of financial time series. So one has to guard on these pitfalls through holdout data cross validation. Ernie Chan's suggestion to use non price related future returns for prediction is probably a valid alternative but I think one could still use future returns or transformation thereof with the same efficacy but with strict cross validation processes to guard against overfitting.

RL is one of the better methods as one can define the environment and conditions and the corresponding reward/penalty as the learning process framework. I also like deep learning neural networks. I am currently experimenting off-Q platform a hybrid technique that combines convolutional NN which specializes in static/image data (think of it as a memorizer of stock charts) and Long-Short Term Memory (LSTM) NN which specilizes in the non-linearity and non stationary of the timeseries. I have had some success with it in Numerai competitions.

Thanks James, very much appreciated!

Keen interests, Joakim and James of mine as well.. while on the subject, you may find these useful:

Convolutional Neural Network Models for Time Series Forecasting

LSTM Models for Time Series Forecasting

ps: Jason Brownlee is an Australian ML & AI practitioner


@ Karl,

Is it difficult to implement these ML in quantopian with long/short algo template?

Hi CcMm,

I have a page on Machine Learning with posts on applying ML by users on the Quantopian platform, and others.
On that page, there is also an article by Saeed Rahman on LinkedIn about using Deep Reinforcement Learning as "Reward Engineering" for "Alpha Combination" in the Quantopian Work Flow. Saeed's report and GitHub repository is at the end of the LinkedIn article.

There is also a video by Delany MacKenzie with Dr Tom Starke on "How Reinforcement Learning can be Applied to Quantitative Finance".

As for applying these ML methods, I have not implemented directly into Quantopian IDE at this point although it may be possible/desirable to pipe in your ML-processed signals as Self-Serve Data to use in a Quantopian algorithm.

Hope this helps.