Click here to Login





                                                   variance between two pairs graphically ?

  0

0
frank
2011-07-09 23:08:08


I am looking to graph Variance between two correlated assets (for exemple : usoil/ukoil, or any other).
Thank You for your help, I am a total newbie at Quantshare ...



QuantShare
2011-07-11 08:26:16

  0

Hi Frank,

Do you mean Covariance (or maybe correlation) between two assets?

Variance is usually applied to a single time-series.



frank
2011-07-11 11:41:59

  0

Yes, exactly ! it would look somewhat like an RSI indicator but would plot values (difference between the two assets) instead of % (altough % should also do the job ;)
I'm Wondering if this can be done easily...? (I guess instutitional plateforms must have those capabilities integrated)
Chelios



frank
2011-07-11 12:00:32

  0

I have found a covariance tool on your site but the string :

Plot(covariance(Perf(GetSeries("DIA", close), 1), Perf(GetSeries("SPY", close), 1),2), "Covariance DIA SPY", colorLime|55|colorLime|64|0, ChartBar, StyleOwnScale

does not seem to recognize the ",2" parameter.

(I changed tried changing the dia and spy to AD and BO, but does not help)



frank
2011-07-11 13:10:05

  0

Just for information, I actually do it manually, with my broker. I take , let's say, 1 long USOIL and 1 Short UKOIL (on my demo account) and graph the results of my running total profit. This gives me a sinusoïdal pattern to witch I can apply technical analysis and risk management. Hope this extra info helps ;)
it would sure help me to find a cleaner solution...



QuantShare
2011-07-11 13:26:14

  0

Best Answer
Actually, it is very easy:
- Create a new pane then click on the "Add Indicator" button (First icon on the top of the chart pane)
- Select "Operation" tab
- Select the minus operator (-)
- In the first input box, click on "Add", select "External Symbol" tab, select/type your asset symbol then click on "OK"
- Perform the same operation for the second input box (select a different asset symbol)
- Click on "OK".

This results in the creation of the following formula:
op1 = GetSeries('SPY', Close) - GetSeries('DIA', Close);
Plot(op1, 'Operation', colorBlack, ChartLine, StyleSymbolNone);

Regarding the Covariance function: (It works)
- You should download the indicator first (Covariance)
- Then apply the following formula (example):

Plot(covariance(Perf(GetSeries("DIA", close), 1), Perf(GetSeries("SPY", close), 1),2), "Covariance DIA SPY", colorLime|55|colorLime|64|0, ChartBar, StyleOwnScale);






Covariance (by Stefan Kroscen, 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

frank
2011-07-12 15:23:46

  0

pfff, I was missing ";" at the end of last string, thanxs. everything OK.
Where can I find the value for Brent ? is there a list I can consult with assets description ?



QuantShare
2011-07-13 07:24:40

  0

Are you looking for a particular Brent index, ETF or futures?
Currently, we do not offer such list.



frank
2011-07-13 13:12:21

  0

In order to play covariance I need both assets to be in the same category (ETF, CFD or futures). Correct me if i'm wrong but i don't think the numbers will mean much if I play Brent on futures and Crude on ETF ? (or maybe I'm wrong and I'll crunch the numbers ;)



frank
2011-07-13 13:34:49

  0

FYI : My actual broker only deals CFD's (so basically "Stock market indexes")...but looking into a futures broker.



(sorry for any approximate english, I'm French mother tongue ;o




frank
2011-07-13 14:50:10

  0

checked out ETF's, since we cannot go bear on ETFs it seems it would be impossible to hedge a covariance strategy.


QuantShare
2011-07-13 14:54:25

  0

You can use assets that aren't in the same category. If you are creating pair strategies then I suggest you read about "cointegration".

To download futures data, you can use the following item: Futures and Forex historical data
For ETFs data: Historical Stock Market Data (Symbols: ETF Symbols)

You can also import CFDs data into QuantShare if you broker allows you to export historical data.






Futures and Forex historical data (by Tom Huggens, 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
Historical Stock Market Data (by QuantShare, 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
ETF Symbols (by QuantShare, 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

frank
2011-07-13 22:17:46

  0

Ok, thank you. I actually use FXCM (not the best but im still learning ;), for those who are interested I found historical data here :
http://forexforums.dailyfx.com/free-strategy-trader-historical-data/220967-free-strategy-trader-historical-data.html

Again, thank you for all your help, your software is quite interesting. I'll keep on playing around with it and see if i'm smart enough to make something of it !

...sad to say but "Time is our enemy" ;)





QuantShare
2011-07-14 08:16:46

  0

Merci beaucoup pour le lien Frank. Si t'a besoin d'aide ou quoi que ce soit, n'hesite pas a me contacter. Tu peut aussi m'envoyer un email à support@quantshare.com

You can download updated Forex data here: Forex Intraday Data (10 years of one-minute bars)






Forex Intraday Data (by QuantShare, 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

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
Minimum Number of Days Between Two Events
Currency Pairs Calendar Data
31 Forex Pairs Historical Data
Design and backtest a trading system with two strategies
Pairs Trading Strategy

How-to Lessons
How to display two stocks on the same chart
How to plot two different time frames in the same chart
How to plot the ratio of two stocks
Difference between the watchlist and the screener tools
How to create a formula

Related Forum Threads
Colour the region between two moving averages
Creating Watchlist with Two Timeframes
How to draw two symbols on 1 chart
Pairs trading
backtesting on currency pairs

Blog Posts
Correlation Between Multiple Trading Systems
Buy the best/top rated stocks or how to create powerful rank base...
How to Use the Percentage Scale
QuantShare Trading Software: New Features in the 3.3.2 Version
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.