0
$\begingroup$

I am looking at crypto coin price data. I compute the correlation matrix but I am unable to invert due to a zero determinant. I'm not quite sure why this is happening as none of the columns are that closely related to each other. Below is the data and the code. Any thoughts?


    mytemp2<- structure(list(`ALGO-USD` = c(0.144779582366589, 0.31738954195379, 
    -0.526153846153846, 0.364935064935065, 0.107040913415794, -0.104856037816932, 
    0.00528084493518954, 0.565425023877746, 0.531116534472239, -0.308627216577007, 
    -0.28299711815562, 0.32395498392283, 0.0209471766848814, 0.311329170383586
    ), `ATOM-USD` = c(-0.0359412667104975, -0.216412821095704, -0.43196982883667, 
    0.400919305413687, -0.0120306234050309, -0.0428044280442805, 
    0.0242868157286045, 0.429055325555137, 0.898340795364762, -0.254300776914539, 
    -0.140651162790698, 0.207620697120589, 0.162603083542488, -0.114726291441789
    ), `BCH-USD` = c(0.824111056989771, -0.182995540601885, -0.284220159497974, 
    0.142009132420091, -0.0462215113954418, -0.0692127106564936, 
    0.00702607755708695, 0.34715327161322, -0.0921284153912553, -0.166569150881299, 
    0.150805142380764, 0.210843373493976, 0.0775867497953273, -0.00178247910700724
    ), `BTC-USD` = c(0.296705097930268, -0.086760764350861, -0.246416744965144, 
    0.342436199771183, 0.0953459303269373, -0.032855311504599, 0.00150828572054018, 
    0.240616919381245, 0.0267257008250803, -0.0751068211068212, 0.280638574793383, 
    0.42804862942699, 0.470537092027266, 0.0175604896571515), `DASH-USD` = c(1.80837063021652, 
    -0.264308604114262, -0.237968665839208, 0.242105748398101, -0.0573637656955527, 
    -0.107010682695084, 0.00130797719122921, 0.211967768922549, 0.0427732364517106, 
    -0.197544915047557, 0.0162380421725978, 0.6051780857033, -0.114936919992193, 
    -0.108401247005283), `EOS-USD` = c(0.590088359585094, -0.152210678907949, 
    -0.368196067255628, 0.273793414524132, -0.0548866855524078, -0.113525665043087, 
    0.00507185122569731, 0.302354920100925, 0.0368098159509203, -0.197134848956711, 
    -0.0197827773467804, 0.290462999604274, -0.204231830726771, 0.0104046242774565
    ), `ETC-USD` = c(1.50830197033429, -0.350838481906443, -0.328076138681169, 
    0.304937272359369, 0.0775314002170879, -0.175564829471866, -0.00279280851806596, 
    0.296866795028881, -0.0912403833175868, -0.151492648150898, -0.0768422895151409, 
    0.299203640500569, -0.170899007589025, 0.00739306460130251), 
        `ETH-USD` = c(0.386775711750637, 0.20902414598865, -0.387602963508352, 
        0.549669371806432, 0.122727052320225, -0.0261725835708733, 
        0.000709597303530263, 0.537227441942918, 0.250908147379346, 
        -0.170550139436263, 0.0746061296507268, 0.595387081760356, 
        0.195575364667747, -0.0043244269117626), `LINK-USD` = c(0.567416418791707, 
        0.44234377665321, -0.441771135158575, 0.638381921302938, 
        0.113065732758621, 0.105203669191858, -0.00175850839945069, 
        0.713343015220453, 0.996152368758003, -0.365616951946607, 
        0.136832153690597, 0.269078301953079, -0.211212180040214, 
        0.0442883049056899), `LTC-USD` = c(0.63996138996139, -0.145968216597999, 
        -0.325465196416265, 0.18492975734355, -0.0176762233239922, 
        -0.0967741935483871, 0.00607385811467442, 0.406182081622797, 
        0.0463678516228749, -0.239783357951748, 0.202072538860104, 
        0.574353448275862, 0.419233401779603, 0.0119765292179086), 
        `OXT-USD` = c(-0.309145427286357, -0.0403645833333334, -0.389416553595658, 
        0.334074074074074, 0.0949472515269294, -0.210953346855984, 
        0.0141388174807198, 0.123574144486692, 1.57642413987592, 
        -0.364929947460595, -0.249224405377456, 0.449494949494949, 
        -0.293316439657903, 0.0228597041685343), `REP-USD` = c(0.583333333333333, 
        -0.214082503556188, -0.0796380090497738, 0.0491642084562438, 
        0.195876288659794, 0.279780564263323, 0.0128597672994488, 
        0.234582829504232, 0.0852105778648382, -0.357400722021661, 
        -0.0456460674157304, 0.200883002207506, 0.0294117647058825, 
        0.0285714285714287), `XLM-USD` = c(0.348240746930499, -0.0592017188662094, 
        -0.281907137712348, 0.653537528133868, 0.0415446071904129, 
        -0.0491065087076338, -0.00784272717766388, 0.460882919778367, 
        -0.00290643744975583, -0.22663937815265, 0.0401374000908874, 
        1.60835764125365, -0.370899327536517, 0.0397891901204404), 
        `XTZ-USD` = c(0.238045270574127, 0.659704564717278, -0.41236549334306, 
        0.710924891371819, 0.0183216630990821, -0.160182414137096, 
        0.00233327676904782, 0.204935031954967, 0.139906565035653, 
        -0.322722790583015, -0.099913553846854, 0.261133296264469, 
        -0.193474688364263, 0.000198787396878952), `ZRX-USD` = c(0.264360974198645, 
        0.0112812886364335, -0.335837941551407, 0.302306538358237, 
        0.590002062363871, 0.0590299088245902, 0.00380579113555357, 
        0.135066527392144, 0.606366327314486, -0.331326333588493, 
        -0.21393300772049, 0.332958642168903, -0.171849884687959, 
        0.0859353023909986)), row.names = c(NA, -14L), class = c("tbl_df", 
    "tbl", "data.frame"))
    
    
    det(cov(temp))

```
$\endgroup$
0