Click here to Login





                                                   How to adjust for splits in QS

  0

0
Dave Walton
2013-07-08 02:58:55


Although it appears that QS recommends using market data that is pre-adjusted for splits, dividends, and corporate actions, I have to disagree about adjusting for dividends. Adjusting for dividends often results in a non-linear distortion of the price series backwards in time and thus one may arrive at wrong conclusions when using technical analysis and trying to identify chart patterns . The two problems are: 1) what you see in backtesting will not match what you would have seen trading at the time, and 2) dividends in the future will change decisions that would have been made in the past and thus invalidates backtesting.

So, I would like to download unadjusted market data and adjust only for splits myself. It is easy to modify the yahoo downloader to get the unadjusted data, but how do I make the adjustment for splits? I already have a custom database with the split information by symbol but can I access that within the downloader or will I need to run a custom script via the script editor?



QuantShare
2013-07-09 06:10:37

  0

You should run a script via the script editor. You can implement your own split logic or you can wait next release so that we implement a "Split" function that takes a split ratio and automatically adjusts your data.


Dave Walton
2013-07-09 06:41:56

  0

Excellent news! Is there an ETA on the next release?


QuantShare
2013-07-09 10:54:13

  1

around 30-40 days (The next update will take longer than usual)


Dave Walton
2013-07-09 11:12:44

  0

OK, thanks. Would you be willing to send me an advance copy of the split function? I would send back beta test feedback.


clonex
2013-07-09 19:37:40

  0

QS 3.0 is comming ? :)


QuantShare
2013-07-09 21:46:28

  0

Ok, I will send you an advance copy when it is ready.

Clonex: Yes, QS 3.0 is almost here




Seeker
2013-10-17 00:58:59

  0

Does the latest version 3.0 have this function which takes a split ratio and automatically adjust the data?


QuantShare
2013-10-17 11:41:42

  0

Yes, in the script editor (Tools -> Script Editor), use the following functions:

Quotes.AdjustForDividend
Quotes.AdjustForSplit

Example:
Quotes.AdjustForSplit("A", new DateTime(2013, 5, 25), "2:1");




Seeker
2013-10-17 13:03:35

  0

OK. Thats great. i was wondering if there is something where QS can pick split/dividends, etc date and details from an excel file/custom database and adjust an entire price database historically for all the symbols.


QuantShare
2013-10-17 15:13:44

  0

You can get splits data from a downloader such as Splits Calendar - Historical data for U.S. Stocks.

After that you will have to write a script to read data from the custom database and apply each split.





Splits Calendar - Historical data for U.S. Stocks (by Patrick Fonce, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads Notes Report an item

Seeker
2015-05-10 22:01:33

  0

When I enter this code for split as follows, noting happens though it says "no errors".

Quotes.AdjustForSplit("70000011", new DateTime(2007, 8, 16), "2:1");


Is it that this line alone would not suffice?



QuantShare
2015-05-11 03:27:02

  0

Make sure symbol is correct and that you select the symbol again in the chart (to reload the data)


No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Splits Calendar - Historical data for U.S. Stocks
Detect and Display Potential Splits on a Chart
Announced Stock Splits
History of dividend payment for stocks in the US stock market
Market Cap Historical Data for the US Stock Market

How-to Lessons
How to adjust a stock for splits
How to download earnings calendar data for various stocks
How to display the number of stocks per day for different RSI gro...
How to download EOD quotes for active and valid stocks only
How to get stocks for a particular index using the global script

Related Forum Threads
how to creat support & resistance level for n days?
How do you retrieve the entry and exit price for a position?
How do I find the close price for an entry matching a custom DB
How to download data for selected symbols ?
how to download Intraday data for NSE Nifty - S&P CNX Nifty

Blog Posts
How to get buy and sell orders for a portfolio based on a trading...
How to Scan for Parallel Resistance and Support Lines
How to Download Trading Data for Certain Securities Only
How to download the history of dividend payments for stocks in th...
Step by step on how to get free realtime/delayed data for stocks,...









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.