How to calculate co-integration in Amibroker . Its possible to calculate co-integration afl without python ?
You need to do that in "R" (there is a plugin in the members zone).
Tomasz has given you one possibility (out of several ones) to do cointegration via AmiBroker.
Apparently he was giving you "R" choice since you do not seem to be advanced programmer (because if you would be one then you would not have asked such question because then you would know that it is doable via AFL too).
So to answer your question about AFL (doing so to lift up AFL over R)...
Yes, you do not need neither R nor Python nor... if you want to program it in AFL alone.
Just to give you proof that almost everything is possible in AFL alone below is picture showing
example of Johansen cointegration tests result output powered by AFL of AmiBroker (there aren't any inbuilt cointegration functions in AFL function reference so you have to program that via AFL Matrix() functionality etc. on your own (once you are experienced enough)).
And for comparison here is result output of MATLAB software using same source data.
So as you can see it is very well possible to do such things because AFL is powerful enough on its own!
As for how to.... take a look via Internet search engines getting mathematical equations or sample algorithms of other languages.
Below is the source data matrix been used to get to the results of the two upper pictures (in case you want to compare results after your possible own coding journey...):
y = MxFromString(
"{
{ 283, 99, 565, 120, 312, 481, 92, 697 },
{ 282, 99, 558, 121, 309, 472, 92, 693 },
{ 277, 101, 560, 117, 306, 475, 96, 696 },
{ 280, 106, 563, 114, 310, 487, 98, 689 },
{ 280, 108, 549, 110, 314, 476, 97, 667 },
{ 273, 108, 545, 103, 315, 471, 97, 653 },
{ 274, 108, 518, 100, 309, 458, 93, 640 },
{ 269, 105, 509, 97, 296, 447, 91, 623 },
{ 263, 104, 505, 95, 303, 455, 89, 601 },
{ 260, 103, 506, 92, 295, 449, 88, 581 },
{ 256, 101, 491, 87, 286, 421, 86, 551 },
{ 251, 100, 472, 93, 282, 390, 85, 525 },
{ 236, 93, 439, 86, 266, 389, 77, 499 },
{ 233, 92, 428, 81, 254, 358, 76, 483 },
{ 238, 95, 420, 82, 250, 379, 77, 490 },
{ 243, 96, 413, 84, 251, 384, 80, 492 },
{ 244, 97, 418, 91, 255, 387, 80, 486 },
{ 249, 98, 415, 94, 269, 399, 80, 487 },
{ 253, 100, 420, 92, 272, 400, 77, 474 },
{ 250, 100, 422, 96, 272, 397, 79, 480 },
{ 251, 101, 426, 95, 273, 403, 81, 487 },
{ 251, 99, 424, 94, 275, 400, 81, 485 },
{ 253, 99, 426, 95, 276, 398, 80, 486 },
{ 249, 96, 427, 89, 273, 389, 80, 482 },
{ 246, 93, 423, 88, 270, 379, 75, 497 },
{ 245, 93, 425, 87, 267, 373, 75, 494 },
{ 252, 95, 431, 89, 267, 379, 77, 499 },
{ 258, 100, 439, 100, 270, 390, 81, 500 },
{ 267, 103, 450, 104, 278, 395, 81, 503 },
{ 273, 106, 466, 107, 284, 402, 83, 515 },
{ 269, 108, 476, 106, 291, 405, 83, 518 },
{ 275, 109, 483, 106, 289, 404, 82, 511 },
{ 277, 110, 489, 104, 287, 405, 81, 509 },
{ 274, 106, 479, 105, 284, 381, 82, 463 },
{ 274, 105, 451, 103, 279, 366, 82, 428 },
{ 271, 101, 454, 98, 273, 347, 80, 422 },
{ 263, 97, 425, 93, 265, 359, 73, 437 },
{ 263, 94, 417, 92, 258, 351, 72, 437 },
{ 265, 97, 429, 92, 260, 364, 77, 445 },
{ 277, 103, 442, 97, 262, 373, 78, 451 },
{ 283, 105, 445, 103, 264, 373, 78, 453 },
{ 287, 106, 447, 105, 265, 378, 79, 458 },
{ 284, 107, 441, 104, 265, 374, 78, 453 },
{ 282, 105, 445, 106, 259, 362, 78, 452 },
{ 284, 105, 445, 95, 260, 360, 79, 453 },
{ 280, 100, 443, 96, 258, 363, 78, 450 },
{ 276, 98, 438, 103, 258, 357, 80, 444 },
{ 271, 93, 429, 101, 254, 344, 79, 446 },
{ 260, 89, 412, 96, 247, 336, 75, 429 },
{ 250, 88, 405, 98, 238, 335, 73, 417 },
{ 246, 89, 407, 96, 231, 338, 75, 418 },
{ 250, 89, 407, 101, 226, 342, 69, 411 },
{ 251, 91, 407, 103, 225, 341, 70, 407 },
{ 252, 91, 403, 101, 225, 342, 70, 407 },
{ 254, 92, 406, 98, 224, 339, 71, 406 },
{ 252, 90, 401, 92, 219, 334, 70, 401 },
{ 251, 90, 400, 91, 218, 336, 70, 399 },
{ 251, 89, 392, 92, 218, 332, 72, 391 },
{ 247, 87, 388, 92, 219, 326, 72, 387 },
{ 240, 85, 386, 92, 218, 319, 71, 383 },
{ 232, 80, 382, 87, 214, 312, 66, 376 },
{ 231, 80, 381, 91, 211, 305, 66, 363 },
{ 232, 83, 384, 91, 207, 305, 68, 363 },
{ 232, 85, 385, 97, 206, 307, 67, 357 },
{ 241, 87, 387, 103, 206, 309, 69, 356 },
{ 239, 89, 390, 104, 209, 310, 69, 359 },
{ 239, 89, 389, 106, 208, 305, 67, 362 },
{ 239, 89, 390, 105, 208, 308, 67, 359 },
{ 239, 89, 393, 105, 208, 307, 68, 365 },
{ 234, 89, 394, 103, 210, 307, 69, 374 },
{ 229, 88, 392, 102, 210, 305, 69, 372 },
{ 223, 87, 390, 99, 208, 299, 69, 363 },
{ 210, 80, 378, 96, 194, 291, 65, 344 },
{ 209, 79, 374, 97, 189, 286, 65, 340 },
{ 208, 80, 372, 98, 188, 289, 66, 342 },
{ 211, 81, 362, 106, 188, 290, 68, 345 },
{ 214, 84, 361, 108, 187, 291, 68, 345 },
{ 217, 85, 363, 111, 191, 292, 68, 348 },
{ 218, 84, 357, 112, 191, 289, 68, 348 },
{ 218, 83, 355, 111, 192, 285, 67, 348 },
{ 216, 83, 353, 109, 191, 289, 67, 350 },
{ 217, 83, 349, 106, 188, 283, 66, 348 },
{ 215, 82, 346, 105, 185, 284, 64, 350 },
{ 212, 79, 346, 101, 183, 280, 63, 349 },
{ 194, 75, 340, 98, 177, 272, 61, 353 },
{ 192, 74, 332, 99, 176, 269, 61, 347 },
{ 194, 76, 339, 101, 177, 272, 62, 350 },
{ 199, 77, 337, 101, 178, 276, 64, 346 },
{ 202, 79, 341, 103, 178, 279, 64, 349 },
{ 206, 79, 348, 107, 182, 284, 65, 324 },
{ 205, 76, 350, 108, 166, 222, 64, 180 },
{ 205, 81, 354, 107, 186, 281, 64, 346 },
{ 204, 81, 354, 106, 187, 285, 64, 350 },
{ 201, 83, 351, 106, 187, 281, 64, 349 },
{ 201, 82, 350, 104, 180, 281, 64, 352 },
{ 200, 81, 351, 101, 177, 276, 63, 350 },
{ 192, 76, 348, 97, 171, 267, 61, 352 },
{ 190, 76, 350, 96, 170, 266, 57, 349 },
{ 192, 78, 356, 95, 172, 271, 62, 350 },
{ 192, 80, 357, 97, 174, 273, 62, 351 },
{ 194, 82, 361, 104, 177, 277, 63, 355 },
{ 199, 83, 361, 106, 179, 279, 63, 361 },
{ 200, 84, 354, 105, 181, 279, 63, 359 },
{ 200, 84, 357, 84, 181, 281, 63, 358 },
{ 199, 83, 360, 83, 179, 280, 62, 358 },
{ 199, 83, 353, 82, 177, 277, 62, 357 },
{ 197, 82, 350, 81, 176, 268, 61, 361 },
{ 196, 82, 353, 96, 171, 264, 59, 360 },
{ 181, 78, 343, 91, 165, 254, 56, 350 },
{ 179, 76, 338, 89, 162, 251, 56, 345 },
{ 182, 77, 341, 90, 165, 249, 56, 344 },
{ 186, 77, 333, 92, 164, 254, 57, 339 },
{ 188, 79, 330, 95, 163, 255, 57, 338 },
{ 191, 80, 329, 97, 164, 256, 56, 339 },
{ 190, 79, 320, 94, 165, 255, 55, 333 },
{ 189, 77, 318, 94, 163, 255, 55, 333 },
{ 186, 77, 317, 92, 161, 253, 55, 331 },
{ 183, 76, 313, 87, 156, 251, 55, 331 },
{ 183, 74, 309, 89, 152, 244, 53, 331 },
{ 178, 73, 307, 86, 149, 236, 51, 329 },
{ 171, 69, 299, 80, 143, 230, 47, 325 },
{ 169, 69, 300, 82, 141, 229, 48, 318 },
{ 171, 70, 302, 83, 142, 232, 49, 314 },
{ 173, 72, 302, 85, 146, 235, 51, 315 },
{ 176, 73, 305, 90, 147, 238, 51, 315 },
{ 178, 74, 305, 92, 149, 241, 51, 312 },
{ 177, 73, 297, 93, 150, 241, 50, 313 },
{ 176, 73, 300, 94, 150, 239, 50, 312 },
{ 174, 72, 301, 93, 148, 239, 51, 312 },
{ 173, 71, 298, 94, 148, 236, 49, 312 },
{ 173, 71, 294, 91, 145, 235, 49, 311 },
{ 170, 69, 294, 88, 144, 225, 49, 310 },
{ 165, 65, 289, 84, 138, 214, 47, 304 },
{ 162, 65, 278, 82, 136, 213, 47, 271 },
{ 162, 66, 281, 83, 136, 210, 48, 291 },
{ 163, 68, 278, 88, 139, 214, 48, 289 },
{ 164, 69, 277, 90, 141, 219, 48, 284 },
{ 161, 71, 281, 93, 142, 210, 48, 252 },
{ 150, 63, 274, 94, 146, 210, 47, 244 },
{ 145, 62, 272, 74, 143, 210, 45, 232 },
{ 147, 61, 275, 93, 141, 211, 45, 235 },
{ 148, 61, 273, 92, 142, 210, 47, 231 },
{ 148, 61, 274, 91, 142, 208, 46, 230 },
{ 148, 68, 275, 88, 143, 211, 46, 277 },
{ 153, 65, 273, 81, 138, 200, 43, 274 },
{ 151, 64, 275, 81, 138, 197, 44, 272 },
{ 147, 65, 280, 82, 142, 198, 46, 274 },
{ 150, 68, 278, 85, 145, 206, 46, 275 },
{ 152, 69, 279, 90, 147, 209, 46, 277 },
{ 155, 70, 279, 91, 148, 212, 48, 280 },
{ 155, 70, 277, 92, 149, 213, 47, 283 },
{ 153, 69, 279, 91, 149, 213, 47, 284 },
{ 152, 69, 279, 89, 150, 212, 47, 284 },
{ 147, 69, 275, 88, 149, 209, 46, 281 },
{ 146, 69, 275, 88, 146, 207, 46, 282 },
{ 144, 68, 276, 85, 145, 202, 46, 280 },
{ 136, 64, 269, 80, 137, 191, 44, 277 },
{ 133, 64, 263, 79, 134, 188, 44, 271 },
{ 137, 65, 262, 82, 137, 191, 46, 275 },
{ 139, 65, 255, 84, 139, 197, 46, 274 },
{ 140, 65, 253, 87, 138, 200, 46, 272 },
{ 141, 67, 251, 88, 140, 200, 46, 271 },
{ 141, 67, 249, 88, 145, 198, 46, 270 },
{ 136, 67, 250, 89, 144, 198, 46, 273 },
{ 136, 67, 245, 85, 142, 196, 46, 273 },
{ 133, 67, 245, 78, 142, 192, 46, 269 },
{ 132, 66, 246, 77, 142, 193, 46, 268 },
{ 131, 65, 246, 74, 141, 190, 45, 259 },
{ 125, 61, 236, 71, 136, 178, 44, 255 },
{ 125, 61, 237, 71, 136, 180, 44, 256 },
{ 129, 64, 239, 73, 138, 184, 45, 255 },
{ 131, 64, 242, 77, 140, 188, 46, 255 },
{ 132, 65, 244, 80, 141, 191, 46, 256 }
}");
EIDT:
R-plugin is kind of broken because it is not easy (anymore) to get required statconnDCOM software by autstat company for home users (for those it was for free months ago). If you want to buy statconnDCOM then it is around $300 to $400 or so. Also R-plugin is available as 32-bit only.
Sir, Instead of sharing examples of Cointegration output, If you could share cointegration code then that will be of topmost use. Matrix is new feature in amibroker and not many amibroker members are eficient in it including me. so Its better if you share cointegration code , maximum members will be thankful to you.
Regards
I'm sorry @Puneet, but you are not in a position, to tell @fxshrat, what he should do. Fxshrat has already shared many example codes of using matrices - here and in another places - and they are not difficult to find.
You have joined this forum over a year ago and until now haven't received even 1 like - which indicates, that your input hasn't been noticed. Fxshrat has currently over 1100 likes - which places him second in ranking - right after Tomasz.
Of course you can always ask - no problem, but you should not tell what someone else should do. Whether fxshrat (or any other user) decides to share the outcome of his/her work and knowledge for free with other users, it is only up to this person. Most of users only take (and demand more), giving nothing in exchange!
Great advice from someone who has done nothing for the community:
First spend some time here - helping others, then tell how other users should behave!
This proves - that you are one of those who think, they can demand everything from other users - like you, fxshrat or me, offering nothing! Why should I spend my free time helping you if you don't help others? Over a year on the forum - and ZERO likes - that tells everything.
(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)
I'm sorry, I won't continue this discussion. I've been spending a lot of time helping others on this forum and have many friends here (who have also helped me - I always appreciate that). I don't have to account for myself.
I see, you like numbers, so it is worth mentioning, that I also gave 575 likes (which currently gives me the second place right after @NowToLook - who is the unquestioned leader in this category ) - what proves that I am a very friendly person
Whaaaaaaaaaat!!!!!!!!!!!!!!!!!
@Puneet you are absolutely right , @Milosz is wasting his precious time on posts like your's
@Puneet, if you are a Py or R expert ,isn't getting aggressive with learning AFL skills is the right thing to do instead of getting aggressive with those who are trying to help you ?
For what it is worth: if anyone finds some post inappropriate, please use "FLAG" feature of the forum. Thanks.