This is a survivorship bias-free S&P 500 database downloader. With this downloader you will be able to test your strategies with more realistic expectations.
I have created this script thanks to this blog post: Getting Accurate Backtesting Results: Survivorship bias-free S&P 500.
Original author is Quantshare Team. Thank You QS!
...
No notes
|
Downloader
Medium
|
| |
This is a replacement for the RandomValues() function.
This function uses the MersenneTwister random number generator in lieu of the .NET system pseudo random number generator to generate random numbers that change every bar. There are many well documented problems with the native .NET implementation but the biggests is too many...
No notes
|
Indicator
Medium
|
| |
Unlike the majority of stock market risk and volatility measures (such as the Standard deviation), the Ulcer Index was designed, by Peter Martin in 1987, to calculate the volatility in the downward direction only. This technical analysis indicator (Ulcer Index) was first introduced in a 1989's book called "The Investors...
No notes
|
Indicator
Medium
|
| |
This mask transforms one rule into 5 rules. It adds to your rules a volatility constraint.
Let's for example say that your rule is: close > sma(close, 20).
The mask will generate 5 rules from the above rule:
Rule 1: Original rule + security volatility must be lower than 10%. ...
No notes
|
Rules Mask
Advanced
|
| |
This list of symbols contains major U.S. indices. The indices fall into one of the following categories: Down Jones, New York Stock Exchange, NASDAQ, S&P, Other US, Treasury and Commodities. For example, the Dow Jones category contains four indexes: Down Jones Composite Average, whose symbol name is ^DJA, Down Jones...
No notes
|
Symbols
Medium
|
| |
Bolsa de Valores, Mercadorias & Futuros de São Paulo or the BM&F BOVESPA is the main exchange in Brazil and the fourth largest exchange in America in terms of market capitalization.
It was formed after the merger of the Bovespa (Sao Paulo Stock Exchange) and the BM&F (Brazilian Mercantile and Futures...
No notes
|
Symbols
Medium
|
| |
This Bankruptcy Fillings downloader gets data from the Bankruptcy Data Project at Harvard. It downloads bankruptcy filed in the United States by individuals and entities (companies).
I have already created a downloader that gets data for the Chapter 7 bankruptcy filings (187). The current item downloads data for all types of...
No notes
|
Downloader
Medium
|
| |
This is an expansion and on the original which diplayed prices rather than returns. I did this 2 years ago and forgot to share.. :(
Added: Equity Cumulative, Benchmark Cumulative, and Equity OverUnder(Equity Cumulative - BM Cumulative)
----------Original--------- ...
No notes
|
Money Manag.
Basic
|
| |
This function calculates the slope of the Weighted Linear Regression.
The Weighted Linear Regression Is an extension of the standard Linear Regression, where a weight is added to each of the points.
It can be used to calculate the linear regression of the closing prices by considering the volume traded on each...
No notes
|
Indicator
Medium
|
| |
This MM script uses three variables to control the amount to invest per trade and the portfolio risk:
1. Stop loss %: the stop loss in % for a single trade
2. Risk per trade: how many % of your trading capital you want to risk in a single trade.
3. Max. risk:...
No notes
|
Money Manag.
Medium
|
| |
This item downloads the Industrial Production Index historical data from the Board of Governors of the Federal Reserve System. The Industrial Production Index or IPI is an economic indicator. It is available in the G.17 Industrial Production and Capacity Utilization Release. It measures the production output in the U.S. industrial...
No notes
|
Downloader
Medium
|
| |
This function utilizes the historical analyst buy/sell recommendations, downloadable from yahoo by 641, to determine how long it has been since an analyst rating has been provided for a stock. This function can be useful in trading algorithms in determining a confidence value for the rating (the longer its...
No notes
|
Indicator
Medium
|
| |
The Traders Dynamic Index uses trend direction, momentum and market volatility to determine market conditions. This indicator uses relative strength index, simple moving average, double exponential moving average and standard deviation to generate five time-series.
The function displays those time-series and returns the TDI or traders dynamic index.
The parameters of...
No notes
|
Indicator
Medium
|
| |
This money management script defines a "Ratio Cash" variable that is used to set the percentage of capital to invest in equities. The rest of the capital remains in cash.
If "Ratio Cash" is equal to 20 then 80% (100-20) will be invested into equities (at least available for buying/shorting securities).
The...
No notes
|
Money Manag.
Advanced
|
| |
This item downloads numbers available in U.S. companies' balance sheet. The data is retrieved for all U.S. stocks and it includes the following figures:
Receivables: This field includes the money owed to the company by its customers and other entities (receivable) (in millions of dollars) minus provisions for bad debt
Inventory: The...
No notes
|
Downloader
Medium
|
| |
Here is another date function named 'BarsToMonthEnd'. It returns the number of trading bars from the current bar up to the last trading bar of the actual month in the calendar. For example, for 30th December 2009, BarsToMonthEnd could return 1, and for 1st December 2009, it could return 22.
The...
No notes
|
Indicator
Medium
|
| |
First introduced in a December 1997 'Stock and Commodities Magazine' article by Stephen I. Klinger, the Klinger Volume Oscillator is a volume-based indicator developed with the intention to be both short-term sensitive and long-term accurate. In fact, KVO measures the sum of in (accumulation) and out (distribution) volumes for a...
No notes
|
Indicator
Medium
|
| |
Watchlist detects historical data that have potential splits, issues in prices, and missing volume.
You may modify/add/remove condition of rules and symbol select criteria per your needs.
After you have result dataset, refresh data of symbols with potential issue by right clicking and selecting "Download Data for Selected Symbol"....
No notes
|
Watch List
Medium
|
| |
The list of symbols in the "Bourse de Toronto" and "TSX Venture Exchange".
This list contains 1581 symbols. Stock description is also included.
The fiscal year ends in the month specified in the Expiration Date field....
No notes
|
Symbols
Medium
|
| |
This object downloads fundamental data/ratios for eleven Indian indices listed on the National Stock Exchange (NSE). The indices are: S&P CNX NIFTY, CNX NIFTY JUNIOR, CNX IT, BANK NIFTY, CNX MIDCAP, CNX 100, CNX PSU BANK, NIFTY MIDCAP 50, S&P CNX 500, S&P CNX NIFTY SHARIAH.
It saves the data in...
No notes
|
Downloader
Medium
|
| |
Among linear filters commonly used in trading, the simple and exponential moving averages are probably the most popular ones. According to John Ehlers, linear filters are optimal when used with stationary data, which is not the case with security quotes. The Ehler Filter invented by John is a nonlinear FIR...
No notes
|
Indicator
Medium
|
| |
The Awesome Oscillator is an indicator that measures the momentum of the market. It consists of calculating the midpoint (high minus low divided by two) and creating two moving averages based on this series. The first moving average uses a 534-bar period and it is subtracted to the second one,...
No notes
|
Indicator
Medium
|
| |
// RSI + SMA(200) + Hurst v001
// 2013-07-16
Inspired by Larry Connors' work on RSI(2). The system buys major ETFs on weakness [RSI(2) < 5] and sells when the recovery starts [RSI > 65]. The system is long only and trades when the price is above the 200 day moving average....
No notes
|
Trading System
Medium
|
| |
This function calculates the number of bars that have passed since a data within a custom database.
You can find another function that calculates the number of bars to a data within a custom database here:
1585
...
No notes
|
Indicator
Medium
|
| |
By adding a stop loss to your trading system, you instruct the simulator or portfolio tool to exit a position if it drops more than N% (from the buy price).
You can add a stop loss by clicking "Stop Loss" (bottom panel in "Update a trading system" form). Once it is...
No notes
|
Money Manag.
Medium
|
| |
The Fibonacci retracement indicator returns a value indicating whether there is a support or resistance near the current stock price. Five different retracement levels or numbers are used: 0%, 38.2%, 50%, 61.8% and 100%.
When calculating the Fibonacci retracement levels, if the highest stock value occurs before the lowest value, then...
No notes
|
Indicator
Medium
|
| |
The Bull Bear Ratio is a market sentiment indicator that measures the strength of the bulls versus the bears. It measures the bulls by calculating the number of stocks whose percent rank value is higher than 70 and the bears by calculating the number of stocks whose percent rank value...
No notes
|
Composite
Medium
|
| |
This item gets daily FII derivatives statistics from the National Stock Exchange website. You can run it daily to get the number of contracts and the amount in Crores in buy and sell positions as well as open interest at the end of the day for index futures, index options,...
No notes
|
Downloader
Medium
|
| |
Dividends are portion of corporate profits that a company decides to redistribute to its shareholders.
Depending on their dividend policy, some companies will pay dividend to their shareholders while others prefer to invest in their future growth.
This downloader gets dividend data from the yahoo finance website. It downloads history of...
No notes
|
Downloader
Advanced
|
| |
This function tells you whether a stock is optionable or not. That is, if a stock has options trading on a market exchange.
Due to exchange requirements such as minimum outstanding shares, minimum share price and other rules, not all stocks has options listed.
This function, whose name is "IsOptionable", requires that...
No notes
|
Indicator
Medium
|
| |
A Market Timing Model is a model or strategy that issues buy and sell signals based on a group of predictive indicators.
Timing Models are usually compared with the buy and hold strategy in order to assess and evaluate its performance. Two measures are particularly important: Annual Return and Strategy...
No notes
|
Downloader
Medium
|
| |
This pivot table will show you how a stock or an asset would have performed intraday depending on two factors, which are the day of the week and the previous intraday return. By intraday, I mean here the open-to-close return and not the yesterday's close to today's close return.
The pivot...
No notes
|
Pivot Table
Advanced
|
| |
The following indicator calculates the percentage change between the actual and forecasted economic event.
As an example, let us say you want to calculate the percentage change of the actual vs estimate numbers for the USD consumer Credit and then see its impact on the underlying currency pair.
You can do so...
No notes
|
Indicator
Advanced
|
| |
This function calculates the number of days until a contract expires. It works with all symbols that have a date in the 'Expiration Date' field. I am using it with these US options symbols (306, 307).
The function takes no arguments and it just uses the date it finds in the...
No notes
|
Indicator
Medium
|
| |
The Barclays Bank PLC issues debt securities called iPath Exchange Traded Notes or ETNs. They allow investors or traders to invest in financial products that track the performance of different market benchmarks or strategies. ETNs are like stocks, they are listed on exchanges and they can be shorted.
These are four...
No notes
|
Downloader
Medium
|
| |
This is a list of UK symbols extracted from the following symbol list: 214. The total number of symbols is 2867. These symbols are selected because they have historical data in Google finance website. The other symbols are rejected.
To download historical data for these ticker symbols (companies listed on...
No notes
|
Symbols
Medium
|
| |
This staggered entry money management strategy lets you enter a certain number of shares when the buy rule is met and the rest of the shares when the position increases by a specific percentage.
For example, we can define the following strategy:
Enter long 60% of shares when the stock crosses its...
No notes
|
Money Manag.
Advanced
|
| |
This item downloads equity put and call data from the CBOE website. Three symbols are created and filled with historical data. These symbols are automatically added to your symbols list. Once symbols are created, you may want to fill their full names with the following information:
^PUT: Equity put options volume...
No notes
|
Downloader
Medium
|
| |
This is a Fibonacci Long and Short Trading System based on the Generic Trading System Template I have uploaded a couple of months ago.
It will identify past swing highs and lows and generate a buy or sell signal when a certain Fibonacci retrace level - which can be optimized -...
No notes
|
Trading System
Medium
|
| |
This composite index calculates for each stock, its close price correlation with the close price of an index. It then averages the results and creates the Average Correlation Index, whose symbol name is "Correl_10bars".
For each trading bar and for each stock (only stocks whose close prices are above two are...
No notes
|
Composite
Advanced
|
| |