Thank you.
this is my w :
dput(w)
structure(c(0.125317152319512, 0.0745439292667052, 0.586077416953187,
0.293766825283739, 0.250302495915074, 0.485794185165549, 0.254711032662707,
0.379498294249792, 0.226853071236893, 0.389874337579722, 0.175638364717147,
0.33205501745088, 0.0575595762802929, 0.164240433092228, 0.345972920695575,
0.110256795228951, 0.368038594116812, 0.148514686946719, 0.0855937166659081,
0.0529870782366488, 0.270380451403551, 0.349162694152531, 0.191884202849581,
0.329179547703677, 0.132554766707465, 0.338694291691177, 0.012763479721988,
0.210360477419355, 0.380296797258491, 0.355253292662155, 0.42866403155979,
0.244238359129883, 0.164478803916939, 0.212813193920356, 0.271169816681886,
0.065254727914323, 0.364486893498494, 0.261626541384135, 0.307256414838707,
0.201885291521473), .Dim = c(10L, 4L))
my return :
structure(c(-0.998211538740179, -0.43432868782487, -0.525312554636326,
1.71122629775979, 1.79203296404209, -0.415539432255763, 0.985070931254484,
0.202075147679626, 0.788809256395595, 0.560738859870469, 0.740264359665588,
-0.755588398187079, 0.732776338490826, -0.0913109703556181, 2.80715374522682,
-3.36438278656583, 1.37597520604356, -0.583050929843676, 1.16272207218291,
-2.54679928694541, 0.866341157919148, 0.646763510440085, 1.31853477071724,
-0.262324296677008, -1.07896543186659, 0.318108259552208, 0.294484288231178,
0.458871664662386, 0.911475824923524, 1.0431700335368, -0.198908968226785,
0.976037546904873, -0.255925704675519, -1.23768194400569, -5.1020164810434,
-5.85497797625401, -2.00508135881581, -4.92079906872824, -2.5861170297131,
3.52136735775739, -5.28336392211601, 6.87767743233172, -4.20110756156529,
-2.46385672697755, -9.64286626325626, 4.9715102414706, -7.97685237502757,
-13.2663044620875, 17.5956307714163, -14.8327584889306, 0.823430549293214,
-16.0387869893928, 4.4033104569972, -3.90286578978376, -7.2158830037786,
19.7885283693386, 7.02848597838246, 3.40161763606437, -5.01148470344503,
1.72070614187483, -5.30030356411579, -9.51467239449855, -1.52752743594293,
-4.07351135699408, 13.0623018205046, 4.32846674435527, 5.01051019243546,
2.9322571340102, -4.85107041711821, -2.17108235434313, -5.34451491995656,
-2.9552871479873, 7.16200391165751, -3.94449850130503, -3.00875110697616,
1.24346843260899, -0.0969721288111458, 0.857336668180153, 2.2470184479209,
3.61367342657246, 8.61038415008561, -5.19944496166529, -3.26364099338159,
-2.22104497264919, 0.41589825475139, -3.20983165064934, 3.19830804431573,
3.14387459943388, -4.7712509293901, -2.60001941903223, -6.34325664834998,
7.14589529342273, -1.91537146150909, 7.258653702924, -1.30929400459907,
3.89959056312028, -0.996907874128272, -0.558161740274965, 5.4355856126473,
7.07019290170274, -3.18156694187319, -3.09660534564724, 1.75168695389525,
2.36963390750473, 6.1935984097655, 1.07578557924057, 2.95023194675421,
3.52766657612857, -2.86460406838369, -3.9706027717064, -7.38761863783122,
3.07593855565846, 2.20793585627943, 1.59377902385049, -1.58415755282926,
-1.74659492756541, -1.20139501526841, -1.49718334107805, -0.0201186765236727,
-4.04364476590287, 2.45188405118153, -4.63302397373662, 1.17059869141221,
0.716848970532169, -1.21533226397483, 0.297270621895862, 2.35724072896923,
-3.76646653961767, -0.118336840912203, -2.54006349614606, 2.89465581002277,
0.35333298522362, 1.35882986815856, 2.62242399295234, -1.07394773899196,
-1.19061458675462, -1.24750534229605, 2.44850352614918, 0.217762305925184,
0.13456551968245, -1.39585183023305, 0.481372834906235, -1.44054118981165,
2.37571112439312, -2.13241063943066, -1.41514516325829, 0.235471583512492,
-0.374872172925933, 2.33332994147428, 0.554074919471237, 3.32202576372858,
2.45056481814974, 1.60097031327542, -1.54194719388885, -1.24692561909905,
-0.00995269621943962, -2.88967459054339, -0.906200203500784,
0.227320828835786, -0.175608743026956, -0.591072381003954, 3.2538167526547,
-0.282285692987472, -0.658397904888197, 3.1313487080415, 0.989866464402045,
-0.930791037834755, 0.862501684108086, 1.86596120350462, 0.057451882948456,
1.15167980909812, -1.91082534830551, 0.106050626078869, -0.977981185824195,
0.572459726363039, 3.71309429333113, -0.551529332871148, -0.658327394197045,
-1.25333862087871, -1.1725285364574, -5.22911044668746, 0.315286300762807,
-3.0099210810886, -0.115178278666139, 0.845036591033654, 2.62471287655792,
-1.0886814552129, 2.52538673212035, 1.07154710110384, 0.275942814162367,
2.21906721175342, -2.07155182109746, 1.57943715028397, 2.5593462102993,
0.263651760926198, 0.253585488137187, -1.51217225786597, -0.190643466376983,
-0.363217760847956, 0.458588737985544, -2.35327953007332, 0.651719635667369,
-1.67183735393488, 3.2589451641841, -3.70358498901231, -4.14494388609299,
-2.03332903849853, -3.57085280476843, -0.580280826629576, 0.186493391624953,
2.33979911520956, 3.04731149894142, 0.114174072590068, 1.75830860045529,
-1.45793031878219, 19.3821358492108, -1.2172325843907, -4.25483123843913,
-0.0180046800143607, 3.44144720239719, 3.15013641558322, -1.86269046197181,
-1.94181291195994, -0.0875724736879135, -1.37616585463665, 3.07016200928931,
3.63707467466785, 0.157698500716119, 0.00828792974960635), index = structure(c(1578009600,
1578268800, 1578355200, 1578441600, 1578528000, 1578614400, 1578873600,
1578960000, 1579046400, 1579132800, 1579219200, 1579564800, 1579651200,
1579737600, 1579824000, 1580083200, 1580169600, 1580256000, 1580342400,
1580428800, 1580688000, 1580774400, 1580860800, 1580947200, 1581033600,
1581292800, 1581379200, 1581465600, 1581552000, 1581638400, 1581984000,
1582070400, 1582156800, 1582243200, 1582502400, 1582588800, 1582675200,
1582761600, 1582848000, 1583107200, 1583193600, 1583280000, 1583366400,
1583452800, 1583712000, 1583798400, 1583884800, 1583971200, 1584057600,
1584316800, 1584403200, 1584489600, 1584576000, 1584662400, 1584921600,
1585008000, 1585094400, 1585180800, 1585267200, 1585526400, 1585612800,
1585699200, 1585785600, 1585872000, 1586131200, 1586217600, 1586304000,
1586390400, 1586736000, 1586822400, 1586908800, 1586995200, 1587081600,
1587340800, 1587427200, 1587513600, 1587600000, 1587686400, 1587945600,
1588032000, 1588118400, 1588204800, 1588291200, 1588550400, 1588636800,
1588723200, 1588809600, 1588896000, 1589155200, 1589241600, 1589328000,
1589414400, 1589500800, 1589760000, 1589846400, 1589932800, 1590019200,
1590105600, 1590451200, 1590537600, 1590624000, 1590710400, 1590969600,
1591056000, 1591142400, 1591228800, 1591315200, 1591574400, 1591660800,
1591747200, 1591833600, 1591920000, 1592179200, 1592265600, 1592352000,
1592438400, 1592524800, 1592784000, 1592870400, 1592956800, 1593043200,
1593129600, 1593388800, 1593475200, 1593561600, 1593648000, 1593993600,
1594080000, 1594166400, 1594252800, 1594339200, 1594598400, 1594684800,
1594771200, 1594857600, 1594944000, 1595203200, 1595289600, 1595376000,
1595462400, 1595548800, 1595808000, 1595894400, 1595980800, 1596067200,
1596153600, 1596412800, 1596499200, 1596585600, 1596672000, 1596758400,
1597017600, 1597104000, 1597190400, 1597276800, 1597363200, 1597622400,
1597708800, 1597795200, 1597881600, 1597968000, 1598227200, 1598313600,
1598400000, 1598486400, 1598572800, 1598832000, 1598918400, 1599004800,
1599091200, 1599177600, 1599523200, 1599609600, 1599696000, 1599782400,
1600041600, 1600128000, 1600214400, 1600300800, 1600387200, 1600646400,
1600732800, 1600819200, 1600905600, 1600992000, 1601251200, 1601337600,
1601424000, 1601510400, 1601596800, 1601856000, 1601942400, 1602028800,
1602115200, 1602201600, 1602460800, 1602547200, 1602633600, 1602720000,
1602806400, 1603065600, 1603152000, 1603238400, 1603324800, 1603411200,
1603670400, 1603756800, 1603843200, 1603929600, 1604016000, 1604275200,
1604361600, 1604448000, 1604534400, 1604620800, 1604880000, 1604966400,
1605052800, 1605139200, 1605225600, 1605484800, 1605571200, 1605657600,
1605744000, 1605830400, 1606089600, 1606176000, 1606262400, 1606435200
), tzone = "UTC", tclass = "Date"), class = c("xts", "zoo"), src = "yahoo", updated = structure(1676732920.66705, class = c("POSIXct",
"POSIXt")), na.action = structure(1L, class = "omit", index = 1578009600), .Dim = c(229L,
1L), .Dimnames = list(NULL, "AXP"))
y= w^T * return , y data will be
dput(head(all_yts1, 20))
structure(c(-0.580967834494634, 0.507479398520152, -0.420854718217509,
0.545327344777418, 1.48328874190858, -0.293625991202183, 0.305454078766549,
0.18354409382499, -0.223466797315721, 0.580862249627697, 0.093945885725705,
-1.56131016252159, -0.476762273181072, 0.345414257000697, -0.74792389468483,
-2.65922432356954, 1.06955037166253, 1.27629873597617, 0.176749981189388,
-2.8848014502591, -0.682793111538542, 0.338465981597116, -0.0989938196758222,
0.33623890210593, 1.32988386108682, -0.324540690803226, 0.393960533719863,
-0.0813038876872903, -0.0448979164648601, 0.366017111430232,
-0.353681936021797, -1.71232564549603, -0.282959462709465, 0.0430018031915345,
0.501480023298234, -2.60470957665064, 1.35383309408865, 0.796740064136971,
0.419135983401322, -3.01604293461369, -0.839358917255938, 0.424576533042379,
-0.471775206085039, 0.0784079358584315, 1.71556810085991, -1.17016536203262,
1.34041486536764, 0.835357120754332, 0.293835725559358, 0.531185080394375,
0.717161308572643, -1.76416374713785, 0.246223902871955, 1.57858711950979,
-0.210974309719014, -1.80206389546457, 1.38822974695243, 1.50555474943637,
0.0883825237289841, -3.65852857957864, -0.762501702062449, 0.43560154873925,
-0.339210969899278, 0.0665577348751397, 1.5840134787506, -0.678784914637079,
0.840170320767625, 0.410803305390874, 0.042364436845636, 0.388495187440142,
0.261540773631844, -1.86288752808977, -0.0251643691441288, 0.672623501131463,
0.235582504999306, -2.21587957726957, 1.45846861608843, 1.18394682263418,
0.311403180187427, -3.1452044499659, -0.660629140842264, 0.239891717259511,
-0.0788256129512871, 0.800738235482466, 1.23380931108273, -0.602144117612077,
0.538204211000472, -0.00703576126436964, 0.175849678321056, 0.632012070740937,
-0.342756274452651, -1.29495521287396, -0.274157465133583, 0.704684467493195,
-0.244967521772638, -2.50690114286587, 1.00281879316964, 0.923572090435656,
0.135432428989633, -3.6111139648543, -0.901895938918957, 0.405678639654747,
-0.352258106261181, -0.27440102663697, 1.71239589366546, -1.06242638278374,
1.33379252735141, 0.708525448709335, 0.265301105906324, 0.297469228860143,
0.548567796145825, -2.05870816717739, 0.345506992090962, 1.13839181811808,
0.72377745057785, -1.80355278021766, 1.7055308672342, 1.2478443676009,
0.338308147727992, -3.41684303506543, -0.578720508011014, 0.214090985182973,
-0.0828735776157977, 1.20773675844956, 1.13541549603013, -0.56509847148058,
0.378895565533564, -0.0895037224493505, 0.174473624420912, 0.823105984953412,
-0.441045114539761, -0.982473036479242, -0.452566757896381, 0.84670503438,
-0.929229569105583, -2.65030889664673, 0.692155470765946, 0.989118506173803,
-0.036909730391039, -3.78114756601329, -0.729493658881572, 0.415551249969171,
-0.379927361119737, 0.341520433633738, 1.55589724374715, -0.793086106402882,
0.875396015970581, 0.476385785841237, 0.112322605302255, 0.556581158110974,
0.325656995743469, -1.62643313650011, -0.0675937718548307, 1.02411620050389,
-0.348832964870822, -2.19445786723307, 1.23107656645279, 1.31939520677256,
0.133041931770422, -3.40358277379452, -0.707953338153062, 0.564116630333372,
-0.506745100070673, 0.00724222289076494, 1.6887343181863, -0.510173347007619,
0.688659520799145, 0.483247935407562, -0.160625604584246, 0.392033994419187,
0.452695883937555, -1.94499132467416, -0.16042673294228, 0.500433069605947,
-0.118281704700903, -2.32321599974747, 1.44141344908114, 1.36327453699102,
0.307673197323693, -2.8034910726218, -0.806286999114405, 0.523443501176467,
-0.505273882737212, -0.168511417045818, 1.76166702140827, -0.827565510262399,
1.06507174525865, 0.700747644664492, 0.0368674051311197, 0.363427920963221,
0.648382837513699, -2.02323806584575, 0.109769719122347, 0.928208207631413,
0.143245414559511, -2.01278416340327, 1.56967057126975, 1.41717789382817,
0.288469687900237, -3.09280662997926), .Dim = c(20L, 10L))
quantile regression for two values of tau e.g tau=.01 and tau=.06 as follow :
dput(quant.matrix.reg1)
structure(c(31.0132004757793, 29.731942064456, 30.8044482731088,
29.3487557479765, 28.368598706984, 29.8900075294188, 28.1435428938265,
29.5148039317729, 31.7521366904934, 30.0404922387529, 105.683565308846,
107.373263664155, 98.988538212407, 102.537110474698, 104.955906616041,
100.54527789393, 105.045438323192, 101.383868555427, 103.556929792691,
100.909647795285), .Dim = c(10L, 2L), .Dimnames = list(NULL,
c("0.01", "0.06")))
dput(max_values_row)
structure(c(9L, 2L), .Dim = 1:2, .Dimnames = list(NULL, c("0.01",
"0.06")))
so row 9 and row 2 has the. maximum values. which means w_9 = [ 0.22685307 0.08559372 0.38029680 0.30725641] is the one maximize my quantile function at tau = .01
How can I store those w that maximize immediately with out do it manually ? I need it because I have a big matrix for w and 99 taus in my real data