Question: For Cadence Design Systems from December 30, 2020 to January 11, 2021, what percentage of days were the 10, 20, 30-day Double Exponential Moving Average lines in long alignment? (Unit: %) (Smoothing factor alpha = 2 / (n + 1); Require 5n data points to warm up; Use the first data point as the initial value) Using unadjusted prices, write down the indicator formula, collect the raw data, calculate the answer, and keep four decimal places. Please list the raw data and key calculation process.
Formula: DEMA = 2 * EMA1 - EMA2; EMA1 = EMA_n(P); EMA2 = EMA_n(EMA1)
Data:
date,close,high,open
2020-05-28,88.05999755859375,89.6500015258789,84.80999755859375
2020-05-29,91.29000091552734,91.58000183105467,88.2300033569336
2020-06-01,91.68000030517578,92.86000061035156,90.8000030517578
2020-06-02,92.37999725341795,92.38999938964844,91.5
2020-06-03,92.95999908447266,93.3000030517578,92.9000015258789
2020-06-04,91.2699966430664,93.01000213623048,92.2300033569336
2020-06-05,91.4000015258789,92.45999908447266,91.18000030517578
2020-06-08,92.12999725341795,92.38999938964844,91.0
2020-06-09,92.55999755859376,93.5199966430664,91.8000030517578
2020-06-10,93.19000244140624,94.18000030517578,93.33000183105467
2020-06-11,88.41000366210938,93.08999633789062,92.8000030517578
2020-06-12,89.45999908447266,91.4499969482422,90.05999755859375
2020-06-15,90.8499984741211,90.87999725341795,88.58999633789062
2020-06-16,92.0199966430664,93.27999877929688,92.37999725341795
2020-06-17,93.06999969482422,93.88999938964844,92.94000244140624
2020-06-18,93.7300033569336,93.8499984741211,93.08999633789062
2020-06-19,91.9000015258789,95.20999908447266,94.9800033569336
2020-06-22,94.45999908447266,94.54000091552734,92.4000015258789
2020-06-23,94.5500030517578,95.29000091552734,95.0500030517578
2020-06-24,91.98999786376952,95.12000274658205,94.31999969482422
2020-06-25,92.66000366210938,92.73999786376952,92.66000366210938
2020-06-26,93.83999633789062,94.56999969482422,93.0
2020-06-29,94.02999877929688,94.12000274658205,93.3000030517578
2020-06-30,95.95999908447266,96.55999755859376,94.4499969482422
2020-07-01,97.06999969482422,97.68000030517578,95.6999969482422
2020-07-02,97.81999969482422,98.80999755859376,97.37999725341795
2020-07-06,98.73999786376952,100.8000030517578,99.52999877929688
2020-07-07,98.7699966430664,100.95999908447266,98.66000366210938
2020-07-08,99.5999984741211,100.12999725341795,99.6999969482422
2020-07-09,101.52999877929688,101.62999725341795,100.7699966430664
2020-07-10,100.97000122070312,101.79000091552734,101.38999938964844
2020-07-13,98.20999908447266,102.08000183105467,101.62999725341795
2020-07-14,99.02999877929688,99.22000122070312,97.16000366210938
2020-07-15,99.11000061035156,100.0,99.6999969482422
2020-07-16,98.68000030517578,99.0999984741211,98.6500015258789
2020-07-17,100.2300033569336,100.68000030517578,98.68000030517578
2020-07-20,103.6999969482422,104.33999633789062,100.66999816894533
2020-07-21,103.58000183105467,106.54000091552734,106.54000091552734
2020-07-22,103.66999816894533,105.13999938964844,104.27999877929688
2020-07-23,102.94000244140624,105.88999938964844,103.41999816894533
2020-07-24,102.58999633789062,103.36000061035156,101.98999786376952
2020-07-27,105.2699966430664,105.41000366210938,103.62000274658205
2020-07-28,104.0500030517578,105.98999786376952,105.44000244140624
2020-07-29,105.97000122070312,107.0,104.43000030517578
2020-07-30,107.6500015258789,108.04000091552734,104.77999877929688
2020-07-31,109.25,109.26000213623048,108.29000091552734
2020-08-03,111.7699966430664,112.31999969482422,109.75
2020-08-04,109.13999938964844,112.0,111.52999877929688
2020-08-05,109.6500015258789,110.93000030517578,109.80999755859376
2020-08-06,110.5199966430664,110.6999969482422,109.26000213623048
2020-08-07,108.52999877929688,110.8000030517578,110.41000366210938
2020-08-10,107.19000244140624,108.3499984741211,108.3499984741211
2020-08-11,105.18000030517578,107.0,106.5500030517578
2020-08-12,107.27999877929688,108.13999938964844,105.37000274658205
2020-08-13,108.66000366210938,109.6999969482422,107.62999725341795
2020-08-14,108.0,109.6500015258789,108.91999816894533
2020-08-17,109.5199966430664,109.91000366210938,108.43000030517578
2020-08-18,109.1500015258789,110.45999908447266,109.56999969482422
2020-08-19,108.52999877929688,109.58999633789062,109.2300033569336
2020-08-20,111.26000213623048,111.62999725341795,108.0
2020-08-21,110.56999969482422,111.1999969482422,110.73999786376952
2020-08-24,111.27999877929688,113.04000091552734,112.0
2020-08-25,111.26000213623048,111.9800033569336,111.37000274658205
2020-08-26,112.66999816894533,113.97000122070312,111.81999969482422
2020-08-27,109.36000061035156,113.47000122070312,113.26000213623048
2020-08-28,110.86000061035156,111.36000061035156,110.5
2020-08-31,110.91000366210938,112.0,110.51000213623048
2020-09-01,113.9800033569336,114.02999877929688,111.18000030517578
2020-09-02,117.08999633789062,117.58999633789062,114.47000122070312
2020-09-03,108.05999755859376,115.3000030517578,114.81999969482422
2020-09-04,105.87999725341795,108.52999877929688,108.16000366210938
2020-09-08,100.44000244140624,103.70999908447266,100.0
2020-09-09,104.33999633789062,105.11000061035156,102.38999938964844
2020-09-10,102.22000122070312,105.80999755859376,104.5199966430664
2020-09-11,101.51000213623048,103.80999755859376,102.91000366210938
2020-09-14,103.2300033569336,104.04000091552734,102.87999725341795
2020-09-15,105.2300033569336,105.87999725341795,104.4499969482422
2020-09-16,102.5500030517578,106.20999908447266,105.7699966430664
2020-09-17,101.1500015258789,101.48999786376952,99.62000274658205
2020-09-18,99.76000213623048,101.95999908447266,101.86000061035156
2020-09-21,102.0999984741211,102.12999725341795,98.75
2020-09-22,102.83000183105467,103.38999938964844,103.38999938964844
2020-09-23,99.72000122070312,102.83000183105467,102.30999755859376
2020-09-24,102.12000274658205,103.0999984741211,98.73999786376952
2020-09-25,103.72000122070312,104.12999725341795,102.0
2020-09-28,105.25,105.33000183105467,105.0500030517578
2020-09-29,105.77999877929688,106.94000244140624,105.81999969482422
2020-09-30,106.62999725341795,107.9499969482422,105.3499984741211
2020-10-01,108.62999725341795,109.30999755859376,107.8499984741211
2020-10-02,105.31999969482422,107.47000122070312,106.37999725341795
2020-10-05,107.45999908447266,107.6500015258789,106.11000061035156
2020-10-06,105.5199966430664,108.0,107.0
2020-10-07,108.44000244140624,108.98999786376952,106.52999877929688
2020-10-08,109.31999969482422,109.5500030517578,109.41000366210938
2020-10-09,111.93000030517578,112.3000030517578,110.29000091552734
2020-10-12,115.55999755859376,116.37999725341795,114.26000213623048
2020-10-13,116.7699966430664,117.87000274658205,116.45999908447266
2020-10-14,116.97000122070312,118.22000122070312,117.0
2020-10-15,115.95999908447266,116.5500030517578,115.0
2020-10-16,115.69000244140624,117.5,116.87000274658205
2020-10-19,113.55999755859376,117.0999984741211,115.51000213623048
2020-10-20,112.61000061035156,116.0,115.3499984741211
2020-10-21,111.2300033569336,113.95999908447266,112.61000061035156
2020-10-22,109.31999969482422,112.05999755859376,111.66999816894533
2020-10-23,112.0500030517578,112.0999984741211,109.87999725341795
2020-10-26,109.87999725341795,112.22000122070312,110.30999755859376
2020-10-27,109.83999633789062,112.1999969482422,110.95999908447266
2020-10-28,107.63999938964844,109.38999938964844,108.0500030517578
2020-10-29,110.20999908447266,111.51000213623048,107.63999938964844
2020-10-30,109.37000274658205,110.73999786376952,108.6500015258789
2020-11-02,110.51000213623048,112.31999969482422,109.9499969482422
2020-11-03,113.58999633789062,114.16000366210938,111.5500030517578
2020-11-04,120.98999786376952,121.4000015258789,117.66999816894533
2020-11-05,124.06999969482422,124.68000030517578,123.79000091552734
2020-11-06,125.5,126.2699966430664,125.04000091552734
2020-11-09,118.56999969482422,127.5,126.45999908447266
2020-11-10,112.38999938964844,116.37999725341795,115.94000244140624
2020-11-11,116.68000030517578,117.81999969482422,114.62999725341795
2020-11-12,114.55999755859376,118.13999938964844,117.13999938964844
2020-11-13,115.81999969482422,116.52999877929688,115.62000274658205
2020-11-16,114.86000061035156,116.37000274658205,115.0
2020-11-17,113.4800033569336,115.16000366210938,115.0
2020-11-18,111.02999877929688,113.44000244140624,113.25
2020-11-19,112.5999984741211,113.12000274658205,111.66999816894533
2020-11-20,112.79000091552734,114.87999725341795,113.0500030517578
2020-11-23,111.25,113.9800033569336,113.5
2020-11-24,110.73999786376952,111.54000091552734,111.3000030517578
2020-11-25,113.04000091552734,113.2699966430664,112.06999969482422
2020-11-27,116.58000183105467,116.88999938964844,113.66999816894533
2020-11-30,116.3000030517578,117.33999633789062,117.22000122070312
2020-12-01,115.6500015258789,117.06999969482422,116.87999725341795
2020-12-02,116.43000030517578,116.79000091552734,114.9499969482422
2020-12-03,116.68000030517578,118.58000183105467,115.72000122070312
2020-12-04,118.33999633789062,119.20999908447266,116.6999969482422
2020-12-07,119.0199966430664,120.16000366210938,118.88999938964844
2020-12-08,118.41000366210938,119.41000366210938,119.33000183105467
2020-12-09,115.48999786376952,121.77999877929688,121.77999877929688
2020-12-10,117.4499969482422,117.9499969482422,114.69000244140624
2020-12-11,118.5199966430664,118.83000183105467,117.2300033569336
2020-12-14,121.30999755859376,122.0199966430664,118.41000366210938
2020-12-15,122.81999969482422,124.22000122070312,122.0999984741211
2020-12-16,125.4000015258789,125.97000122070312,123.86000061035156
2020-12-17,127.3000030517578,127.37000274658205,126.30999755859376
2020-12-18,132.02000427246094,132.25999450683594,127.37999725341795
2020-12-21,131.72999572753906,131.89999389648438,130.89999389648438
2020-12-22,134.3699951171875,134.91000366210938,132.2100067138672
2020-12-23,133.05999755859375,135.99000549316406,134.86000061035156
2020-12-24,134.0,134.6199951171875,133.49000549316406
2020-12-28,134.75999450683594,136.0,135.85000610351562
2020-12-29,133.97999572753906,135.75,135.1300048828125
2020-12-30,135.25,136.05999755859375,134.7100067138672
2020-12-31,136.42999267578125,136.83999633789062,135.4199981689453
2021-01-04,135.75999450683594,138.30999755859375,136.88999938964844
2021-01-05,136.13999938964844,137.3300018310547,136.74000549316406
2021-01-06,130.63999938964844,133.41000366210938,132.33999633789062
2021-01-07,137.0500030517578,137.49000549316406,132.13999938964844
2021-01-08,136.19000244140625,138.5399932861328,136.9499969482422
2021-01-11,134.69000244140625,136.30999755859375,133.88999938964844

Indicator data:
date,10-day,20-day,30-day
2020-08-19,109.1079459080402,110.01877848546076,109.64167088185857
2020-08-20,109.94490271793333,110.51448080027232,110.11411771860246
2020-08-21,110.32055397097699,110.80185138004173,110.44617914878285
2020-08-24,110.81497957238881,111.16378629912045,110.82594900841093
2020-08-25,111.15472076924281,111.45749066252816,111.1576899593608
2020-08-26,111.85174559338925,111.9519056369095,111.62449840096545
2020-08-27,111.25118459102838,111.76269105911429,111.62404906842661
2020-08-28,111.28250544132642,111.85811685417295,111.80153701587983
2020-08-31,111.30603512414092,111.93624948723762,111.95918694761448
2020-09-01,112.32357038242866,112.54781609227567,112.47613473411366
2020-09-02,114.08758531678907,113.625602332534,113.32313548401164
2020-09-03,112.38258451179505,112.9011998527402,112.9524749434956
2020-09-04,110.3776636421723,111.86883221374653,112.33551816853752
2020-09-08,107.08849795229682,109.98257452105044,111.08943897099161
2020-09-09,105.95612896829603,109.0594230388212,110.44162306706203
2020-09-10,104.44384613430277,107.87635047359787,109.58457926250014
2020-09-11,103.12326553441221,106.72779147174978,108.71524311063702
2020-09-14,102.75450492816643,106.05227931902193,108.13924673068892
2020-09-15,103.18452463568016,105.83652196985388,107.86448093565107
2020-09-16,102.65405768515612,105.16823511743794,107.27840811508626
2020-09-17,101.83270146564212,104.34346277264164,106.57101888984818
2020-09-18,100.80079543981051,103.38718927461353,105.75582811498977
2020-09-21,100.84916149112411,102.99597890202752,105.30966871329979
2020-09-22,101.16421217183265,102.80003650370442,104.9970169599741
2020-09-23,100.40208191861129,102.07573855968319,104.32604062458935
2020-09-24,100.66273636268231,101.89683972730842,104.0193652108863
2020-09-25,101.4143232591302,102.04266750853175,103.94287025158667
2020-09-28,102.4994571569025,102.45480598067246,104.0660503937522
2020-09-29,103.49200234916547,102.91367824113472,104.24495793953972
2020-09-30,104.51306090502226,103.46950147494249,104.51405390859371
2020-10-01,105.92771783409648,104.31597351693456,105.00809499428956
2020-10-02,105.86983706210103,104.44756693511498,105.04220160727134
2020-10-05,106.52035180247455,104.95141025977222,105.34042718544582
2020-10-06,106.3455599466233,105.03467919443791,105.3679877534709
2020-10-07,107.16655034658541,105.63695089302298,105.75736045801642
2020-10-08,108.04914473429557,106.31502814847917,106.21916345787751
2020-10-09,109.54479423562368,107.37082366828233,106.96211844338546
2020-10-12,111.8248630291981,108.93494763533434,108.08625615480018
2020-10-13,113.8746652918098,110.49492241664191,109.25222355443769
2020-10-14,115.40867762058701,111.86510735806745,110.32886270611934
2020-10-15,116.15330743531594,112.84981522293529,111.17258572825767
2020-10-16,116.556133186283,113.63512257717143,111.89716545549514
2020-10-19,116.09302713286422,113.91021346994054,112.28108045301114
2020-10-20,115.38522889688329,113.95988964405593,112.50375323921743
2020-10-21,114.3634730258312,113.73797073804099,112.52674297103208
2020-10-22,112.94449574719334,113.18707530138661,112.30296249917627
2020-10-23,112.7772642637074,113.19627873335082,112.43560472059553
2020-10-26,111.92391693359369,112.79976370465585,112.27911044977083
2020-10-27,111.27187685854408,112.44143929557187,112.12717679273412
2020-10-28,110.06078060985547,111.72542877545985,111.70998161981393
2020-10-29,110.01960760794111,111.5684638327892,111.6488566396187
2020-10-30,109.72065470906045,111.2752712923615,111.48448504845153
2020-11-02,109.88579671671904,111.22478687035323,111.47418899161357
2020-11-03,111.03516111642811,111.73570641876897,111.84576398950843
2020-11-04,114.33530920153093,113.51316500998185,113.10223816820621
2020-11-05,117.78267137330343,115.59472970233416,114.6192475779811
2020-11-06,120.77098262459833,117.63496997064075,116.16472932481683
2020-11-09,120.63684434897408,118.11929385400143,116.6907347308194
2020-11-10,118.43574855435264,117.39875807359878,116.38718381477685
2020-11-11,118.18061037747611,117.54173227264874,116.64059177707755
2020-11-12,117.2593811007862,117.2663729489766,116.59779614837561
2020-11-13,116.96998424019581,117.24498962355995,116.70919878963495
2020-11-16,116.42088467599571,117.04041078694277,116.68311443457057
2020-11-17,115.54550871649569,116.60282715656045,116.48037867149444
2020-11-18,114.0813132019236,115.77185356930997,115.98453806033763
2020-11-19,113.51928752772628,115.3334206700548,115.72603634574017
2020-11-20,113.17547646848534,114.98419670156872,115.51052770838933
2020-11-23,112.42348775252304,114.39905677184123,115.118306083991
2020-11-24,111.71270161655396,113.79898440762936,114.69527604569484
2020-11-25,111.96506219544383,113.69725691212983,114.59580777439012
2020-11-27,113.33978119041498,114.2501989152601,114.94432397237198
2020-11-30,114.27460077705423,114.67317254893234,115.22116578342487
2020-12-01,114.752468005,114.91625799495654,115.38676321221087
2020-12-02,115.35988396135531,115.26339795523359,115.63017657785014
2020-12-03,115.88452162945504,115.60349758121949,115.8777415470613
2020-12-04,116.81078119249267,116.19279839413088,116.30501594671253
2020-12-07,117.70618530319243,116.818028347986,116.77231847355175
2020-12-08,118.1473692625965,117.23915408051536,117.11445476911366
2020-12-09,117.48609824091213,117.0647988059174,117.05464012222372
2020-12-10,117.62537600218405,117.26334408677764,117.2405269100161
2020-12-11,118.06653278102888,117.62166933263326,117.53768469572388
2020-12-14,119.29915750132373,118.42926297489583,118.15021232884862
2020-12-15,120.68995128663101,119.39040677101833,118.88795960951936
2020-12-16,122.544286522043,120.67632837777529,119.87211553367321
2020-12-17,124.5081218536039,122.1164928102061,120.99364192210994
2020-12-18,127.47537999804334,124.19865493884552,122.590758762566
2020-12-21,129.5160912790383,125.92143326578326,123.99147803360916
2020-12-22,131.82810125540635,127.863286274952,125.57915639415114
2020-12-23,133.02678291812688,129.27425218649705,126.84159255344012
2020-12-24,134.14104879332095,130.63412037440781,128.08964949719802
2020-12-28,135.13353739655133,131.91569746031493,129.30136295456742
2020-12-29,135.5277312323441,132.84909114252534,130.28709208083282
2020-12-30,136.1602843693559,133.85380560831874,131.32368971087584
2020-12-31,136.9437172094533,134.90298046949934,132.39453567249546
2021-01-04,137.2296943594978,135.65413765815174,133.2647994617377
2021-01-05,137.49816993846855,136.3389257831478,134.0842304844959
2021-01-06,135.81481324178546,135.8999525576366,134.12311140620272
2021-01-07,136.63587934628544,136.65571479320863,134.9430560956328
2021-01-08,136.91491095680053,137.1219444332258,135.56199594827908
2021-01-11,136.5818690261406,137.2230354356723,135.9189579067057

Answer: 37.0