Directory of Open Source for Quantitative Finance and Trading
Username: Password: Not registered?
 
Quick Search:    (AJAX based: No need to press button)

Main : .NET : 


Category: .NET View Full Details
Download Now!Johansen Cointegration test for stocks in yahoo finance
Submitter: vanna Date: 2011/2/9
Description:
Source code for project is available in http://www.quantcode.com/modules/docmanager/view_file.php?curent_file=404&curent_dir=19

Screenshot:

This application performs Johansen's max eigen value test to verify cointegration for maximum of 12 stocks.

To use this program, simply click on the install link. ClickOnce takes care of all dependency issue, and this program should work on both 32bit and 64bit Windows.

Following are steps to use this program:
1. Enter either a list of symbols or paste space delimited series. If symbols are entered, it will query yahoo finance to get the adjusted close price of each stock.
2. After calculating the lagged matrix, Eigen value decomposition is performed and then Johansen test results are displayed in the Stats tab.
3.The Eigen tab displays eigenvalues and eigenvectors.
4.Life tab displays graph of spread for the currently selected eigenvalue.


Got a question or problem with this link? Just enter your message and click on submit. No registration is required.

Note: A copy of this message will also be emailed to the submitter of this link
Downloaded 889 times  889  File Size 0 bytes  Supported Platforms C# .NET WPF GSL  Home Page http://www.quantcode.com
Rating: 0.00 (0 votes)
Rate this File | Modify | Delete | Report Broken File | Tell a Friend | Comments (46)

Poster Thread
Anonymous
Posted: 2011/2/7 13:15  Updated: 2011/2/7 13:15
 Johansen Cointegration test for stocks in yahoo finance
got this error (my CPU is Windows XP 32bit):

PLATFORM VERSION INFO
Windows : 5.1.2600.131072 (Win32NT)
Common Language Runtime : 4.0.30319.1
System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll : 4.0.30319.1 (RTMRel.030319-0100)
dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll : 4.0.31106.0 (Main.031106-0000)

SOURCES
Deployment url : file:///C:/my%20documents/papers/Johansen%20Test(2).application

IDENTITIES
Deployment Identity : Johansen Test.application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e7c1e172d0e909b0, processorArchitecture=x86

APPLICATION SUMMARY
* Installable application.

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\my documents\papers\Johansen Test(2).application resulted in exception. Following failure messages were detected:
+ Deployment and application do not have matching security zones.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [02/07/2011 10:11:38 AM] : Activation of C:\my documents\papers\Johansen Test(2).application has started.
* [02/07/2011 10:11:38 AM] : Processing of deployment manifest has successfully completed.
* [02/07/2011 10:11:38 AM] : Installation of the application has started.

ERROR DETAILS
Following errors were detected during this operation.
* [02/07/2011 10:11:38 AM] System.Deployment.Application.InvalidDeploymentException (Zone)
- Deployment and application do not have matching security zones.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.


Poster Thread
Anonymous
Posted: 2011/2/7 13:25  Updated: 2011/2/7 13:25
 Johansen Cointegration test for stocks in yahoo finance
never mind, install worked fine when i used internet explorer instead of firefox. now i am etting this error after i click on calculate button:
Event Type: Error
Event Source: .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID: 5000
Date: 02/07/2011
Time: 10:22:13 AM
User: N/A
Computer: HJKS788
Description:
EventType clr20r3, P1 johansen test.exe, P2 1.0.0.0, P3 4d4f3280, P4 johansen test, P5 1.0.0.0, P6 4d4f3280, P7 18, P8 17, P9 system.dllnotfoundexception, P10 NIL.

Data:
0000: 63 00 6c 00 72 00 32 00 c.l.r.2.
0008: 30 00 72 00 33 00 2c 00 0.r.3.,.
0010: 20 00 6a 00 6f 00 68 00 .j.o.h.
0018: 61 00 6e 00 73 00 65 00 a.n.s.e.
0020: 6e 00 20 00 74 00 65 00 n. .t.e.
0028: 73 00 74 00 2e 00 65 00 s.t...e.
0030: 78 00 65 00 2c 00 20 00 x.e.,. .
0038: 31 00 2e 00 30 00 2e 00 1...0...
0040: 30 00 2e 00 30 00 2c 00 0...0.,.
0048: 20 00 34 00 64 00 34 00 .4.d.4.
0050: 66 00 33 00 32 00 38 00 f.3.2.8.
0058: 30 00 2c 00 20 00 6a 00 0.,. .j.
0060: 6f 00 68 00 61 00 6e 00 o.h.a.n.
0068: 73 00 65 00 6e 00 20 00 s.e.n. .
0070: 74 00 65 00 73 00 74 00 t.e.s.t.
0078: 2c 00 20 00 31 00 2e 00 ,. .1...
0080: 30 00 2e 00 30 00 2e 00 0...0...
0088: 30 00 2c 00 20 00 34 00 0.,. .4.
0090: 64 00 34 00 66 00 33 00 d.4.f.3.
0098: 32 00 38 00 30 00 2c 00 2.8.0.,.
00a0: 20 00 31 00 38 00 2c 00 .1.8.,.
00a8: 20 00 31 00 37 00 2c 00 .1.7.,.
00b0: 20 00 73 00 79 00 73 00 .s.y.s.
00b8: 74 00 65 00 6d 00 2e 00 t.e.m...
00c0: 64 00 6c 00 6c 00 6e 00 d.l.l.n.
00c8: 6f 00 74 00 66 00 6f 00 o.t.f.o.
00d0: 75 00 6e 00 64 00 65 00 u.n.d.e.
00d8: 78 00 63 00 65 00 70 00 x.c.e.p.
00e0: 74 00 69 00 6f 00 6e 00 t.i.o.n.
00e8: 20 00 4e 00 49 00 4c 00 .N.I.L.
00f0: 0d 00 0a 00 ....

Poster Thread
Anonymous
Posted: 2011/2/7 13:42  Updated: 2011/2/7 13:42
 Johansen Cointegration test for stocks in yahoo finance
Hi,
Thanks for your valuable feedback.
I think it must be failing when trying to load libgsl_d.dll. The included libgsl_d.dll is currently depending on MSVCR100D.dll , and it will not load if that dll is not found - this is typically the case if Windows version might not be current. I forgot to make the libgsl_d.dll statically linked, and will create a new deployment update.
Thanks for using QuantCode!

Poster Thread
Anonymous
Posted: 2011/2/8 12:26  Updated: 2011/2/8 12:26
 Johansen Cointegration test for stocks in yahoo finance
I have updated the version now. Please let me know if you still have the error
Regards - vanna

Poster Thread
Anonymous
Posted: 2011/2/8 12:53  Updated: 2011/2/8 12:53
 Johansen Cointegration test for stocks in yahoo finance
thanks, works like a charm!

Poster Thread
Anonymous
Posted: 2011/2/16 18:16  Updated: 2011/2/16 18:16
 Johansen Cointegration test for stocks in yahoo finance
the source code version must be similar, it errors out saying it can't find libgsl_d.dll even though it is there. could you post the project to create the statically linked libgsl_d.dll? I'd like to experiement with creating an x64 version of the Johansen cointegration program. Thanks

Poster Thread
Anonymous
Posted: 2011/2/16 19:46  Updated: 2011/2/16 19:46
 Johansen Cointegration test for stocks in yahoo finance
Hi,
Thanks for your feedback. I wonder why it is not picking it up. Did it not error out while debugging, or while running the clickonce installed version?
If it errored out during debugging, please verify if you have placed the libgsl dlls in the debug folder.
If you are interested in trying a x64 version, please build GSL from http://www.quantcode.com/modules/mydownloads/singlefile.php?cid=10&lid=594 (the version in sourceforge is older version)
Please let me know if you find any issues, thanks for using quantcode

Poster Thread
Anonymous
Posted: 2011/2/17 12:36  Updated: 2011/2/17 12:36
 Johansen Cointegration test for stocks in yahoo finance
It errored out while debugging - I was trying to run a local version using local source. A zip file with the application code and perhaps even the gsl dll build project as a sub-project in a single visual studio project would be especially nice. I'll try building the gls dll's again and give it a try. is the the Feb. 6th johntest.zip project and code the same as the current click-once version? Warm regards

Poster Thread
Anonymous
Posted: 2011/2/17 13:06  Updated: 2011/2/17 13:06
 Johansen Cointegration test for stocks in yahoo finance
While debugging the 2 gsl dlls have to be placed in the debug folder, otherwise it will not pick them up.
The c# project setting is enabled for x86. There is actually a Wow CLR version on 64 bit PCs, which enable 32 bit apps to run on 64 bit PC. I verified it during runtime, but had not tested it while debugging.
Thanks for the feedback though, I will create a link to download 64bit GSL dlls
Have a nice day

Poster Thread
Anonymous
Posted: 2011/2/17 13:40  Updated: 2011/2/17 13:40
 Johansen Cointegration test for stocks in yahoo finance
Thanks Vanna. (I registered for the site). I built the two dlls and put them in the same folder as the Johansent Test.exe and it runs without errors. Very informative. Thank you for creating this fascinating and educational C# project. Warm regards.

Poster Thread
Anonymous
Posted: 2011/2/17 13:41  Updated: 2011/2/17 13:41
 Johansen Cointegration test for stocks in yahoo finance
Since I used the "reply" button, it didn't tag my post with my user id. Making this post to see if my username is added.

Poster Thread
Anonymous
Posted: 2011/2/17 13:53  Updated: 2011/2/17 13:53
 Johansen Cointegration test for stocks in yahoo finance
You're welcome, I am glad this program was helpful!

Poster Thread
Anonymous
Posted: 2011/3/18 19:04  Updated: 2011/3/18 19:04
 Johansen Cointegration test for stocks in yahoo finance
Thanks so much for this code. I have been looking everywhere online for a C#/Java implementation of this.

Poster Thread
Anonymous
Posted: 2011/3/24 18:13  Updated: 2011/3/24 18:13
 Johansen Cointegration test for stocks in yahoo finance
I was wondering if you had an issues with running a reasonably large batch of assets (70+) with the program. The GSL calls seem to crash and I suspect that it's a memory issue but I can't walk through the binary DLL. In addition, I am having issues building a x64 DLL from the custom GSL DLL that you use.

The error thrown is R610 - abort() has been called.

Poster Thread
Anonymous
Posted: 2011/4/12 23:35  Updated: 2011/4/12 23:35
 Johansen Cointegration test for stocks in yahoo finance
Can you tell me what the "Enter Lags" field is for? It seems to default to "5". What analysis would I run to figure out what the lag should be? Also, what does "Conclsion: No of cointegrating vectors is 0" mean?

Poster Thread
Anonymous
Posted: 2012/4/26 15:37  Updated: 2012/5/6 19:15
 Johansen Cointegration test for stocks in yahoo finance
I also would like an answer to the questions above? What lag should i enter and what does "Conclsion: No of cointegrating vectors is 0" mean?

Discuss this file. Just enter your message and click on submit. No registration is required.
Similar Links:

Subscribe to RSS or daily email updates of latest quantitative finance code listings
Email address :
Copyright © 2011 QuantCode Inc. All rights reserved.