Blog

Home » Blog

Get Back Adjusted Historical Data for Amibroker using Python and Tiingo api

In this post I will share a quick way for Amibroker users to update quotes using split and dividend back adjusted data from a fairly new provider, Tiingo.com. Although we do run our investment strategies on our very own QuantTrader, we use various other tools to analyse markets, including Amibroker. The problem: Where to download dividend adjusted data Many Amibroker users build strategies that rely on dividend adjusted historical data. At this moment it is difficult to find similar data since Yahoo, as well as many other sources, do not back-adjust prices to include dividends. A solution is to use free (or rather donation-based) EOD data from Tiingo.com. What happened to the free Yahoo finance historical data? Yahoo! finance has changed their Yahoo Finance API and the way the data is delivered. This has disrupted the workflow of many self-directed investors that use Excel or Google sheets to track their holdings. It has also created problems for users of financial software that use Yahoo's service. The service has not been discontinued. Rather, it has been changed. You can still retrieve stock, ETF, mutual funds and currency historical data. From what we can see so far, the data is in json format, adjusted for splits but not for dividends, although the dividend information is provided in the data and can be retrieved (as of 6/3/2017). If you use Amibroker, you can use the updated Amiquote to retrieve data using the new Yahoo API. It will not be dividend-adjusted (just try to download a bond ETF like "TLT"). If you want to continue an existing workflow of dividend-adjusted data, you can try this solution. You will need: Amibroker. A free account at Tiingo.com to get a Token # A way to run the following Python script. Tingo API  docs for daily prices: https://api.tiingo.com/docs/tiingo/daily         [...]

2017-06-03T16:30:26+00:00 By |8 Comments

The Logical-Invest monthly newsletter for June 2017

Logical Invest Investment Outlook June 2017 Our top 2017 investment strategies, year-to-date: The Maximum Yield strategy with 29.66% return. The Leveraged Universal strategy with 21.89% return.   The NASDAQ 100 strategy with 21.80% return. SPY, the S&P500 ETF, returned 8.48%. News: Our brand new U.S. Sector Rotation made its live debut with a +2.53% return for the month. You can subscribe for free. Market comment: Both the U.S. equity and the U.S. bond markets were positive for May. SPY (S&P 500 ETF) added +1.41% and TLT (30-Year Treasury ETF) added +1.89%. Even though SPY is reaching new all-time heights, it under-performed many of our strategies and in particular the ones with foreign exposure, such as the World-Top 4, Global Market and Global Sector Rotation strategies. This shows that the U.S equity market is slowing down compared to foreign and emerging markets. On the other hand, Brazil, with a, -18% drop on May 18th reminds us that these markets suffer from local political risk and need to be properly hedged and diversified. Our top 3 strategies continue to be the biggest gainers for May. Our 3x UIS strategy added another +4.3%, the MYRS added +3.11% and the Nasdaq 100 added +2.99%. On the 4th and 5th spot are the Global Market rotation(+11.23% YTD) and Global Sector Rotation (+11.75% YTD) strategies. Summer is often volatile. Our slow and steady risers cam limit your risk: BRS (+6.81 YTD%) and the BUG (+6.29% YTD) bond-based strategies. We wish you a healthy and prosperous 2017. Logical Invest, June 1, 2017   Logical Invest strategy performances May 2017 Strategy performance overview: Visit our site for daily updated performance tables. Symbols: BRS - Bond Rotation Strategy BUGST - A conservative Permanent Portfolio Strategy BUGLEV - A leveraged Permanent Portfolio Strategy GMRS - Global Market Rotation Strategy GMRSE - Global Market Rotation Strategy Enhanced GSRLV - Global Sector Rotation low volatility NASDAQ100 - Nasdaq 100 strategy WORLD-TOP4 - The Top 4 World Country Strategy UIS - Universal [...]

2017-06-01T08:07:41+00:00 By |0 Comments

The Morpheus ETF Strategy: Combining the Blue Pill and the Red

A guest post by Tom Gnade. Are you also interested in sharing your thoughts? Contact us! Several years ago, the Logical Invest whitepapers first introduced me to rotation investment strategies. After some research, I subscribed to the MYRS (the "Maximum Yield Rotation Strategy"), with good results. It was the first paid investment subscription I had ever used. I moved on to another service to learn options trading, and did well for two years, until a number of sharp setbacks made me come to terms with my investment goals. After further reflection, here is what really matters to me: Consistency. One must have clear goals and consistent methods for selecting, entering, and exiting positions. Emotions make for very bad decisions. Efficiency. I work two jobs and love spending time with my family. I can’t spend hours each day actively managing investments and assessing risk. Risk management. I need a method that consistently redistributes risk, and that doesn’t rely on my own knowledge or intuition, which are so often flawed. It is too easy to chase gains and too difficult to recoup the inevitable losses. Objectivity. I am not in finance, and I don’t have the knowledge required to manage investments in individual stocks, where risk is difficult to predict at best. Programmatic investing substitutes objective rules for guesswork. Simplicity. I don’t want to manage too many investments at the same time. I like the aesthetic appeal of simplicity, which has the added benefit of limiting transaction costs. Results. I hate drawdowns, especially ones that take a long time to recover. I don’t mind volatility, as long as it slopes up. I love gains. Big gains. Go figure. So, that’s it. I need a fast, precise, powerful, scientific method shown to perform through thick and thin. Only an automated investment strategy can hope to fulfill these [...]

2017-05-05T12:10:56+00:00 By |25 Comments

The Logical-Invest monthly newsletter for May 2017

Logical Invest Investment Outlook May 2017 Our top 2017 investment strategies, year-to-date: The Maximum Yield strategy with 25.75% return. The  NASDAQ 100 strategy with 18.26% return.   The Leveraged Universal strategy with 16.86% return. SPY, the S&P500 ETF, returned 6.97%. News: Our new U.S. Sector Rotation strategy is live (and for a limited time, free!). Unlike what you may have seen before, this strategy consists of 5 sub-strategies tracking sector momentum, mean reversion and relative under-performance to create a variable-beta play on the U.S. market. And yet it is very simple to implement. Give it a try. Thank you for your support of our QUANTtrader forum were you can share and discuss your own custom strategies.   Market comment: As we are heading into early summer, most assets classes are performing well partly due to a weakening U.S. dollar. Domestic equity continues to reach new highs, foreign and emerging equity markets are up while junk bonds and foreign bonds have now recovered from past corrections. Commodity performance is mixed but commodities do present a longer term opportunity for portfolio unclusion, as inflation resistant assets. Treasuries remain flat. The story in the media is that we are entering a more mature business cycle in the U.S. while foreign markets (China, India, Brazil and partly Europe) are also in growth and recovery mode. The sentiment is positive, at least as far as the major management companies go while individual investors are cautious, expecting a possible U.S. equity correction. The year long expectation of higher volatility due to tighter policy still is discussed but we have not seen this in the actual market. Far from it, we are seeing extremely low volatility levels compared to historical norms as well as perceived political risk in the U.S. and Europe. Our strategies performed as expected. Maximum Yield strategy added another 3.42% in April, keeping it in our top spot at +25.75 for the [...]

2017-04-29T14:57:16+00:00 By |1 Comment

The Logical Invest long-short US Sector Rotation Strategy

- A US sector rotation meta strategy combining dynamically 5 different sector strategies based on SPDR ETF The following paper will explain how to build a U.S. sector rotation strategy which allocates dynamically between 4 different long US sector rotation strategies and one short US sector rotation strategy. This strategy is therefore different from our Global Sector Rotation strategy, as it only employs US sectors. Due to low correlation of these sector rotations, the combination creates an ETF sector rotation model with considerably higher Sharpe values. The addition of the negatively correlated short sector rotation model significantly reduces volatility and drawdowns during difficult market periods. The chart shows the portfolio performance (black) compared with the S&P500 index (SPY ETF – red). The result is a meta sector ETF rotation strategy which performed well since 2000 in the backtests. The Sector rotation strategy produced an average yearly profit of 12.8% (SPY 5.1%) and a Sharpe ratio of 1.16 (SPY 0.25). Maximum drawdown was only 17% (SPY ETF 55%). So, the sector rotation model performed about 4x better than the S&P500. What makes this sector etf rotation strategy interesting is that it does not rely on either treasuries or bonds to balance out and hedge in times of market stress. It uses the short US ETF sector strategy as a hedge instead. The hedging mechanism is purely “short equity” and unrelated to whether interest rates rise, a common concern when holding bonds in a portfolio. The U.S. Sector ETF’s - here SPDR ETF U.S. sector ETFs, based on the Dow Jones U.S. Industry Indices, have been within the first ETFs on the U.S. market. There are sector ETF available from SPDR, Vanguard, Schwab, iShares. There are also European versions of these sector ETFs as well. These 10 Dow Jones U.S. Industry sectors [...]

2017-04-21T14:29:01+00:00 By |10 Comments

The Logical-Invest monthly newsletter for April 2017

Logical Invest Investment Outlook April 2017 Our top 2017 investment strategies, year-to-date: The Maximum Yield strategy with 21.58% return. The  NASDAQ 100 strategy with 15.00% return.   The Leveraged Universal strategy with 13.02% return. SPY, the S&P500 ETF, returned 5.92%. News: Try our QUANTtrader software with our 30-day free trial. There is no better way to understand how our strategies work. Join our new QUANTtrader forum were users dare adjust the strategies and share new ones! Check our new European section.  Our in-depth 2-hour QUANTtrader webinar, with Frank Grossmann. Get a behind-the-scenes look at our strategies. We updated our web-site home page and menu.   Market comment: For the second time in three months, the Federal Reserve increased its benchmark interest rate a quarter point taking the overnight funds rate to a target range of 0.75 percent to 1 percent. Treasuries had small comeback since then signalling that the market had already priced in the Fed move and was bracing for a much more hawkish tone. Treasuries are once again negatively correlated to the equity market which is a positive for our strategies. The market is expecting two more hikes, in June and December. Volatility continues to be extremely at low levels, sending the ZIV etf (medium term inverse VIX etf) and our Maximum Yield strategy to new highs. Just like last month, what is interesting is the unnaturally low expectation of future volatility, with 8-month out VIX futures being below the 17 price level. Last month's VIX Futures term structure:   VIX term structure February 28th 2017 This month's VIX Futures term structure:   VIX term Structure March 31st 2017 This continuing "flattening" of the curve is unusual. In plain terms, future expected volatility levels seem to be low even though we are looking at upcoming French elections, Brexit negotiations as well as U.S. policy uncertainties. Investors seem fearless as the U.S. market is still at the top of the price chart. Investors may want [...]

2017-04-20T11:02:20+00:00 By |0 Comments

The Logical-Invest monthly newsletter for March 2017

Logical Invest Investment Outlook March 2017 Our top 2017 strategies, year-to-date: The Maximum Yield strategy with 14.90% return.  The Leveraged Universal strategy with 13.97% return. The  NASDAQ 100 strategy with 11.28% return.  SPY, the S&P500 ETF, returned 5.79%. News:  Our in-depth  2-hour QUANTtrader webinar, with Frank Grossmann. Get a behind-the-scenes look at our strategies. We are testing a new U.S. Sector-based strategy that should be available in the coming months.   Market comment: The S&P 500 is reaching new all time highs, currently at +10% from it's previous support in the summer of 2016. It is following a straight line with no major corrections since the U.S. elections. This type of movement makes investors nervous about a coming correction. Interestingly, looking at the VIX term-structure we see the following picture: VIX term structure February 28th 2017 This is highly unusual. Having near-month VIX contracts at very low prices is normal as the SP500 is breaking upwards. What is interesting is that far-out contracts are at extremely low levels as well, making the curve somewhat flatter than normal. This implies that market participants expect low levels of volatility in the future, even 9 months out. We will see how this plays out in the coming months. Our top 3 strategies are all U.S. market based and have achieved returns above 10% in just 2 months. Our Maximum Yield strategy, has returned an additional 4.1% in February, bringing year-to-date returns to 15%. Our 3x UIS strategy added 9% due to equity performance as well as a small upward reaction from oversold Treasuries. Our Nasdaq 100 added just 1.2% for the month. Of note is that the Nasdaq strategy has the lowest 60-day correlation to SPY, just 0.36, second only to our Gold-USD strategy's 0.18. Apart from our high flying strategies, it is worth mentioning and tracking our more defensive ones. Our Universal Investment Strategy [...]

2017-03-21T01:22:43+00:00 By |0 Comments

Top Performing ETFs Strategies – Portfolio Idea

In the follow up to our webinar about how to compose top performing ETFs strategies among the QuantTrader community last weekend, we received many interesting questions and ideas to follow up. One question in particular I´d like to share in a post, as it involves all our “All Strategies” subscribers.John L. asks: “Using a simple meta strategy by choosing the top two strategies from the previous month (from the monthly newsletter), and investing in them the next month (repeating that each month). I wonder if that can be backtested and compared to past 3 months or a static meta strategy. Perhaps comparing the top 2 each month strategy to the choosing the top 2 from the last 3 months. And comparing the top 2 each month or 3 months to a static strategy of the top 2 - 4 over the full backtest period or past 5 or 10 years.”So in other words, what´s the best way to pick from the Top Performing ETFs Strategies of the last months, and allocate equal amount of money among them? We publish the performance of all our strategies monthly in a handy ranking table, so it´s easy to pick each month the best performers of the last months, and repeat this throughout the year.The idea is appealing, as it is an enhancement from our Portfolio Builder Approach, where we apply modern portfolio theory to assemble a fixed weighting portfolio based on the historical performance and co-variance between the strategies. By modifying this to a momentum style “strategy picking” of top performing ETFs strategies we react to changes in the market and therefore overcome one of the critiques MPT receives frequently.Top Performing ETFs Strategies in one PortfolioI modelled this quickly in QuantTrader, following the “Strategy of Strategies” approach we introduced in QuantTrader in the last [...]

2017-04-21T11:39:04+00:00 By |3 Comments

Interactive webinar Quanttrader: Building high-performing Strategies

On Saturday February 11, 2017 the QuantTrader Community of Logical Invest hosted their first interactive Webinar to explore the functionalities of the software and exchange on tips for building and backtesting high-performing ETF rotation momentum strategies for retirement and savings accounts. Background of QUANTtrader QUANTtrader is a swiss-made software tool used to develop, backtest and implement rules-based ETF Rotation investment strategies. Since it is built by a trader and long-time investor rather than by a developer, QuantTrader’s main strength is in building medium to long term investment portfolios that are diverse, adaptive and can control risk. All this without writing a single line of code. The software comes per-populated with all strategies currently run by Logical Invest. These are strategies that have been successfully running “live” for 1-3 years as of  February 2017, so you can actually track past performance. You can customize, tweak existing or build your own strategies. Live Recording of the Session - 2 hours in-depth review on ETF Rotation Momentum Strategies Agenda: How to get started? File Management & Main functionalities Benefit of QuantTrader Dynamic Allocation vs. Online Portfolio Builder Markowitz Modern Portfolio Theory Ranking Algorithms and Strategy Parameters Optimization routine and how to avoid over optimization Extending backtests with synthetic tickers Consideration for combining strategies into MetaStrategies Showing off – Some of the best strategies and portfolios so far Free 30 days trial – Try it out now! Interested in giving it a try? Build your own high performing Portfolio for savings or retirement account, most IRA and 401k plans are supported. No credit card or PayPal needed, register now. To learn more about building your ETF Rotation Momentum strategy with QuantTrader see here. A good fit for Advisors and money managers using ETF Rotation Momentum Strategies In many ways, QT is a good fit for [...]

2017-04-20T01:27:47+00:00 By |0 Comments