Click here to Login





                                                   Can one add a vector of price and trade signals and get a backtest?

  0

0
pat
2011-05-27 17:39:22


Hello All,

I am currently evaluating the system and I was wondering if there is a feature to import a vecto of signal data to use as
input to the backtest/evaluation platform:
ex. input1.txt contains
b,b,b,h,h,sh,sh,sh

the closing would be automatic when string is complete...

Thank You.



QuantShare
2011-05-28 05:26:02

  0

Hi Pat,

It is possible to import signal files and use this data in trading rules

You have to import files using "Data -> ASCII" import and save the signals in a custom database (You can also automate the import by creating a downloader)

Example:
Date, Signal
2/10/2010, B
2/11/2010,B
2/12/2010,B
2/13/2010,Sh
2/14/2010,Sh
2/15/2010,H
2/16/2010,B

Steps:
- Select "Data -> Edit Databases -> Manage databases" then create a new historical database. Example: Signal
- Select "Databases" tab, "custom -> signals" database then add a new field "signal" of "string" type.
- Select "Data -> ASCII Import"
- If the data doesn't contain ticker symbols then specify a default ticker symbol for each file using the "Update Symbol name" button (first screen)
- Add two columns:
signals -> Date
signals -> signal

- To buy a security when "B" signal is detected:
buy = GetDataStringCount("signals", "signal", "B");



pat
2011-05-30 15:56:29

  0

Thank you for the suggestions. I tried to repeat the above, and looked over tutorials, but could not get simulator to work as I wanted to.
1) I created a raw .csv file with B,H,H,..S,B,H,H,....S,B,H...S repeating vector column corresponding to 9/7/2005-5/30/2006. The idea was to have a buy and sell signal repeat every 25 bars during the time period enclosed by the corresponding dates. I could have also used continuous buys for 24 bars, followed by a 25th sell, but tired both combinations with no success.
2) I imported via ascii import tab on menu, but dates always seem to append time information to the date output, with no choice to omit them.
3) Tried to use the above rules (in your example) and a) They generate no ouput under simulator (with aapl selected as custom symbol to use) b) Used the wizard with an alternate strategy list, buy = (GetDataCount('signal1','signal'))==(GetDataString('signal1','signal','B'));
sell = (GetDataCount('signal1','signal'))==(GetDataString('signal2','signal','S'));
This worked to generate a strategy, but the trade events were erratic and non-synchronized to the date/event order I expected from my signal1 db.
[IMG]http://i55.tinypic.com/rsrj8o.jpg[/IMG]
Any suggestions on what I am doing wrong, or possibly a more explicit illustration of how to get the above scenario to work would be great.
Also, one other suggestion, would be to allow clipboard copy/pasting in the formula windows, as it is tedious to type out the entire rule set each time I test.

Thank You,
Pat



QuantShare
2011-05-31 07:31:24

  0

Best Answer
1) It looks like you have succeeded to import your list of signals (picture)

2) If the time is set to "0:0:0:0" then just ignore it (Everthing is ok)

3) The functions "GetDataCount" or "GetDataString" gets database data for the active symbol. Your signals were assigned to a symbol whose name is "SIGNAL" (Check the email I have sent you few days ago for more info)

Example:
When analyzing GOOG, the function (GetDataCount('signal1','signal')) returns 0 because there is not data associated with the stock GOOG in the signal1 database.

You have to associate signals data with the appropriate symbol or symbols (Example: AAPL)
or you can reference an external symbol (requires creating a custom function)

Let me know if there is anything else I can help you with



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
Entry Price and Exit Price in Trading System Report
Price and Volume Trend
Large price and volume gain after consolidation
Short Term Volume and Price Oscillator
Tweet Sentiment Index for the Forex and Stock Market

How-to Lessons
How to create and trade a Neural Network model
How to download and use U.S. stocks earnings data
How to add trades from one portfolio to another one
How to download EOD quotes for active and valid stocks only
How to plot support and resistance lines automatically

Related Forum Threads
Where can I get global historical stock and bond index prices?
Plot Up/Down Arrows corresponding to buy and sell signals
How do you retrieve the entry and exit price for a position?
Can I update the sector and industry information in the stock dat...
Analyze correlations between rules and next-day upward price move...

Blog Posts
3 Items To Get and Trade the News In QuantShare Platform
How to predict and trade the stock market using pivot points
How to get buy and sell orders for a portfolio based on a trading...
Step by step on how to get free realtime/delayed data for stocks,...
Backtesting chart patterns using the auto support and resistance ...









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.