Question: For HCA Healthcare, how many times did the 20-day and 5-day Weighted Moving Average lines produce a death cross between January 22, 2024 and October 30, 2024? (Weights are 1, 2, ..., n) 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: WMA_n = \sum_{i=0}^{n-1} (n-i) * P_{t-i} / \sum_{j=1}^{n} j
Data:
date,close
2023-12-21,268.75
2023-12-22,269.989990234375
2023-12-26,271.70001220703125
2023-12-27,271.2200012207031
2023-12-28,270.4800109863281
2023-12-29,270.67999267578125
2024-01-02,275.32000732421875
2024-01-03,272.0799865722656
2024-01-04,273.1000061035156
2024-01-05,275.8399963378906
2024-01-08,281.489990234375
2024-01-09,279.3299865722656
2024-01-10,282.5
2024-01-11,282.5299987792969
2024-01-12,282.19000244140625
2024-01-16,280.82000732421875
2024-01-17,277.8800048828125
2024-01-18,284.82000732421875
2024-01-19,287.7699890136719
2024-01-22,288.3099975585937
2024-01-23,284.9100036621094
2024-01-24,278.92999267578125
2024-01-25,286.0199890136719
2024-01-26,283.42999267578125
2024-01-29,286.7300109863281
2024-01-30,301.5899963378906
2024-01-31,304.8999938964844
2024-02-01,314.6600036621094
2024-02-02,309.4200134277344
2024-02-05,310.6199951171875
2024-02-06,306.82000732421875
2024-02-07,307.2799987792969
2024-02-08,305.4599914550781
2024-02-09,306.32000732421875
2024-02-12,310.1600036621094
2024-02-13,304.5400085449219
2024-02-14,305.42999267578125
2024-02-15,307.6600036621094
2024-02-16,308.54998779296875
2024-02-20,308.5799865722656
2024-02-21,311.6199951171875
2024-02-22,312.8399963378906
2024-02-23,315.3599853515625
2024-02-26,313.20001220703125
2024-02-27,314.0
2024-02-28,312.0599975585937
2024-02-29,311.70001220703125
2024-03-01,311.9800109863281
2024-03-04,314.0799865722656
2024-03-05,315.5400085449219
2024-03-06,323.3999938964844
2024-03-07,324.6600036621094
2024-03-08,325.3699951171875
2024-03-11,321.25
2024-03-12,323.54998779296875
2024-03-13,321.8999938964844
2024-03-14,324.7799987792969
2024-03-15,321.9700012207031
2024-03-18,327.1700134277344
2024-03-19,330.4800109863281
2024-03-20,328.8599853515625
2024-03-21,328.8500061035156
2024-03-22,329.94000244140625
2024-03-25,327.32000732421875
2024-03-26,327.7099914550781
2024-03-27,331.69000244140625
2024-03-28,333.5299987792969
2024-04-01,330.1099853515625
2024-04-02,329.3500061035156
2024-04-03,332.20001220703125
2024-04-04,325.1700134277344
2024-04-05,328.79998779296875
2024-04-08,328.0199890136719
2024-04-09,328.8900146484375
2024-04-10,327.760009765625
2024-04-11,327.25
2024-04-12,322.82000732421875
2024-04-15,322.6300048828125
2024-04-16,313.8900146484375
2024-04-17,311.0299987792969
2024-04-18,297.0
2024-04-19,305.1099853515625
2024-04-22,310.3099975585937
2024-04-23,319.42999267578125
2024-04-24,319.0199890136719
2024-04-25,314.1199951171875
2024-04-26,306.69000244140625
2024-04-29,311.4200134277344
2024-04-30,309.82000732421875
2024-05-01,309.44000244140625
2024-05-02,308.8399963378906
2024-05-03,307.760009765625
2024-05-06,310.0599975585937
2024-05-07,314.45001220703125
2024-05-08,309.4200134277344
2024-05-09,321.8900146484375
2024-05-10,326.6499938964844
2024-05-13,317.17999267578125
2024-05-14,320.5
2024-05-15,326.9599914550781
2024-05-16,322.7099914550781
2024-05-17,322.8599853515625
2024-05-20,325.04998779296875
2024-05-21,321.1199951171875
2024-05-22,318.4100036621094
2024-05-23,315.32000732421875
2024-05-24,318.70001220703125
2024-05-28,318.6600036621094
2024-05-29,325.1300048828125
2024-05-30,335.1000061035156
2024-05-31,339.75
2024-06-03,332.70001220703125
2024-06-04,332.0
2024-06-05,336.9100036621094
2024-06-06,336.82000732421875
2024-06-07,337.44000244140625
2024-06-10,341.260009765625
2024-06-11,336.3099975585937
2024-06-12,340.8099975585937
2024-06-13,340.8999938964844
2024-06-14,337.4700012207031
2024-06-17,335.4700012207031
2024-06-18,340.6400146484375
2024-06-20,338.3699951171875
2024-06-21,338.9200134277344
2024-06-24,341.3699951171875
2024-06-25,340.45001220703125
2024-06-26,340.4800109863281
2024-06-27,343.2900085449219
2024-06-28,321.2799987792969
2024-07-01,315.1199951171875
2024-07-02,319.70001220703125
2024-07-03,326.54998779296875
2024-07-05,320.29998779296875
2024-07-08,316.2099914550781
2024-07-09,316.9100036621094
2024-07-10,315.3500061035156
2024-07-11,317.510009765625
2024-07-12,324.32000732421875
2024-07-15,316.9800109863281
2024-07-16,318.9100036621094
2024-07-17,322.9800109863281
2024-07-18,321.7300109863281
2024-07-19,322.1600036621094
2024-07-22,325.3800048828125
2024-07-23,340.1700134277344
2024-07-24,343.94000244140625
2024-07-25,352.7900085449219
2024-07-26,354.7799987792969
2024-07-29,358.7300109863281
2024-07-30,361.3500061035156
2024-07-31,363.0499877929688
2024-08-01,363.1199951171875
2024-08-02,356.3599853515625
2024-08-05,350.17999267578125
2024-08-06,352.92999267578125
2024-08-07,352.2699890136719
2024-08-08,360.6700134277344
2024-08-09,360.8999938964844
2024-08-12,361.3999938964844
2024-08-13,368.8599853515625
2024-08-14,371.5799865722656
2024-08-15,371.8900146484375
2024-08-16,373.7699890136719
2024-08-19,374.2099914550781
2024-08-20,375.30999755859375
2024-08-21,376.6700134277344
2024-08-22,383.1199951171875
2024-08-23,388.7799987792969
2024-08-26,388.5
2024-08-27,390.1799926757813
2024-08-28,390.1799926757813
2024-08-29,392.7900085449219
2024-08-30,395.5899963378906
2024-09-03,395.8299865722656
2024-09-04,394.2999877929688
2024-09-05,397.75
2024-09-06,387.9800109863281
2024-09-09,384.9500122070313
2024-09-10,386.4299926757813
2024-09-11,388.6499938964844
2024-09-12,391.6700134277344
2024-09-13,394.6799926757813
2024-09-16,403.4299926757813
2024-09-17,397.5
2024-09-18,399.8900146484375
2024-09-19,403.5199890136719
2024-09-20,404.6600036621094
2024-09-23,405.7000122070313
2024-09-24,401.7999877929688
2024-09-25,405.1099853515625
2024-09-26,403.8599853515625
2024-09-27,403.2799987792969
2024-09-30,406.4299926757813
2024-10-01,405.4500122070313
2024-10-02,403.8500061035156
2024-10-03,392.4599914550781
2024-10-04,394.0700073242188
2024-10-07,382.5299987792969
2024-10-08,378.5799865722656
2024-10-09,386.3599853515625
2024-10-10,387.25
2024-10-11,394.5400085449219
2024-10-14,395.7799987792969
2024-10-15,401.260009765625
2024-10-16,409.2300109863281
2024-10-17,406.4800109863281
2024-10-18,415.5400085449219
2024-10-21,410.760009765625
2024-10-22,408.1700134277344
2024-10-23,410.0299987792969
2024-10-24,398.8999938964844
2024-10-25,363.5499877929688
2024-10-28,356.5899963378906
2024-10-29,360.6700134277344
2024-10-30,360.9200134277344

Indicator data:
date,20-day,5-day
2024-01-22,280.43885628836495,285.5779988606771
2024-01-23,281.1598090762184,285.9079996744792
2024-01-24,281.23428460984,283.9719970703125
2024-01-25,281.9414264497303,284.32932739257814
2024-01-26,282.3337116059803,283.7433268229167
2024-01-29,282.98214140392486,284.5466654459635
2024-01-30,284.96842694963726,290.4086649576823
2024-01-31,287.1227598644438,296.2619974772135
2024-02-01,290.06576043991817,303.6373331705729
2024-02-02,292.3069523402623,307.35667114257814
2024-02-05,294.4894757952009,309.7433349609375
2024-02-06,296.144476609003,309.2706705729167
2024-02-07,297.7226670038132,308.60266927083336
2024-02-08,298.99442807152155,307.16933186848956
2024-02-09,300.23876211983816,306.63600056966146
2024-02-12,301.7355243501209,307.58933512369794
2024-02-13,302.56385846819194,306.7000040690104
2024-02-14,303.36400059291293,306.25933430989585
2024-02-15,304.2453342982701,306.6853352864583
2024-02-16,305.10266650971914,307.26133015950523
2024-02-20,305.86390337262833,307.6986592610677
2024-02-21,306.8181411016555,309.25465901692706
2024-02-22,307.7613789876302,310.7453267415365
2024-02-23,308.7831396193731,312.5819905598958
2024-02-26,309.4594742547898,313.1853312174479
2024-02-27,310.0702362060547,313.7453328450521
2024-02-28,310.3663789295015,313.2973327636719
2024-02-29,310.57838018508187,312.7000040690104
2024-03-01,310.7846669514974,312.2720072428385
2024-03-04,311.2037132626488,312.7693339029948
2024-03-05,311.7396189371745,313.6946695963542
2024-03-06,313.0006660098121,317.1373331705729
2024-03-07,314.30276169549853,320.24400024414064
2024-03-08,315.5897136869885,322.72333170572915
2024-03-11,316.3894756498791,322.93666585286456
2024-03-12,317.3371888660249,323.43866170247395
2024-03-13,318.06399797712055,322.8566609700521
2024-03-14,318.9824266706194,323.33466186523435
2024-03-15,319.54109366280693,322.8679972330729
2024-03-18,320.5268570672898,324.36133626302086
2024-03-19,321.73919154575896,326.56334025065104
2024-03-20,322.69295203799294,327.7633341471354
2024-03-21,323.5636669340588,328.4960021972656
2024-03-22,324.4619528634208,329.32066853841144
2024-03-25,325.0412867954799,328.7406697591146
2024-03-26,325.59052400134857,328.2806660970052
2024-03-27,326.45352419898626,329.3320007324219
2024-03-28,327.398285929362,330.80799967447916
2024-04-01,327.9133797781808,330.8319946289063
2024-04-02,328.2697614397321,330.59133097330727
2024-04-03,328.824857875279,331.1653361002604
2024-04-04,328.63109726678755,329.0966735839844
2024-04-05,328.77461983816966,328.67266845703125
2024-04-08,328.8241426013765,328.3039978027344
2024-04-09,328.94390593029203,328.3646687825521
2024-04-10,328.9196687244234,328.07933756510414
2024-04-11,328.82681143624444,327.9200032552083
2024-04-12,328.2865738641648,326.1453389485677
2024-04-15,327.73757411411833,324.706005859375
2024-04-16,326.3530514671689,320.7126749674479
2024-04-17,324.759384445917,316.76600545247396
2024-04-18,321.9221461704799,309.2580037434896
2024-04-19,320.0090016682943,306.4699971516927
2024-04-22,318.7041441417876,306.59599609375
2024-04-23,318.3613337925502,310.5833272298177
2024-04-24,318.0170469738188,314.064658610026
2024-04-25,317.24747503371464,315.37999267578124
2024-04-26,315.85395144508,313.07732950846355
2024-04-29,315.03871459960936,312.2460021972656
2024-04-30,314.16009608677456,310.8073384602865
2024-05-01,313.3382866269066,309.88267211914064
2024-05-02,312.56771472749256,309.39666951497395
2024-05-03,311.7720489501953,308.9026713053385
2024-05-06,311.29562000093006,309.1040018717448
2024-05-07,311.322811453683,310.8593383789063
2024-05-08,310.9397173200335,310.6293416341146
2024-05-09,311.8315756661551,314.5573445638021
2024-05-10,313.202289109003,319.20200602213544
2024-05-13,313.6528596423921,319.4306681315104
2024-05-14,314.44557378859747,320.2913330078125
2024-05-15,315.8220490955171,322.90199584960936
2024-05-16,316.7179053896949,322.92666015625
2024-05-17,317.5056182861328,322.9466573079427
2024-05-20,318.4173790341332,323.94932250976564
2024-05-21,318.884664335705,323.11732381184896
2024-05-22,319.0858075823103,321.3406616210938
2024-05-23,318.99557015555246,319.1039998372396
2024-05-24,319.22152361188614,318.48667195638023
2024-05-28,319.3864762079148,318.133339436849
2024-05-29,320.13314325241817,320.3626729329427
2024-05-30,321.75642947242375,325.64800618489585
2024-05-31,323.7003817603702,331.37067057291665
2024-06-03,324.8257161458333,333.1146728515625
2024-06-04,325.7656207856678,333.69200439453124
2024-06-05,327.06866861979165,335.0166707356771
2024-06-06,328.2561930338542,335.5260050455729
2024-06-07,329.3722884405227,336.12733764648436
2024-06-10,330.7781465076265,338.156005859375
2024-06-11,331.64300333658855,337.96400349934896
2024-06-12,332.8453363327753,338.98466796875
2024-06-13,333.9595261346726,339.77533162434895
2024-06-14,334.6806690034412,339.1506652832031
2024-06-17,335.14104992094497,337.8573323567708
2024-06-18,336.0337653750465,338.6733378092448
2024-06-20,336.63605026971726,338.4440022786458
2024-06-21,337.20857500348774,338.5606730143229
2024-06-24,337.91676461356025,339.6260030110677
2024-06-25,338.413289242699,340.1246724446615
2024-06-26,338.80909946986606,340.3013407389323
2024-06-27,339.3686237153553,341.425341796875
2024-06-28,337.7454803466797,334.8846720377604
2024-07-01,335.60147952125186,327.4666687011719
2024-07-02,334.0109565371559,323.32533772786456
2024-07-03,333.1347169421968,322.8506652832031
2024-07-05,331.68919169108074,321.22132771809896
2024-07-08,329.9332382928757,319.7613260904948
2024-07-09,328.342095656622,318.87266235351564
2024-07-10,326.7001437232608,317.34466552734375
2024-07-11,325.3872873942057,316.82667032877606
2024-07-12,324.8125260126023,319.18133951822915
2024-07-15,323.6172411237444,318.8213419596354
2024-07-16,322.71966974167594,319.0533406575521
2024-07-17,322.29809904552644,320.50867513020836
2024-07-18,321.81695687430243,321.03867594401044
2024-07-19,321.46681402297247,321.43067423502606
2024-07-22,321.50052839006696,323.0400065104167
2024-07-23,323.00729123070124,329.01934204101565
2024-07-24,324.8788148425874,334.8380065917969
2024-07-25,327.57657717750186,342.20934041341144
2024-07-26,330.40524335588725,348.1733378092448
2024-07-29,333.55538693382624,353.2793395996094
2024-07-30,336.7767204647972,357.03533935546875
2024-07-31,339.9398141043527,359.9460001627604
2024-08-01,342.9031466529483,361.6059977213542
2024-08-02,345.04852585565476,360.32399291992186
2024-08-05,346.43362005324593,356.8766581217448
2024-08-06,347.91885710216707,354.9159912109375
2024-08-07,349.16971290225075,353.2966573079427
2024-08-08,351.04476158505395,355.1959981282552
2024-08-09,352.7361893426804,357.3353312174479
2024-08-12,354.30104573567706,359.3386637369792
2024-08-13,356.36485377720425,363.0806599934896
2024-08-14,358.4498524983724,366.667323811849
2024-08-15,360.3329492478144,369.0699971516927
2024-08-16,362.1562340146019,371.35132853190106
2024-08-19,363.7756619408017,372.92132771809895
2024-08-20,365.26732860746836,374.0039957682292
2024-08-21,366.7211873372396,375.11000162760416
2024-08-22,368.6334728422619,378.02666625976565
2024-08-23,370.9403778076172,382.0813334147135
2024-08-26,373.05871146065846,385.04200032552086
2024-08-27,375.1952825637091,387.60999755859376
2024-08-28,377.19456801641553,389.18666178385416
2024-08-29,379.31323590959823,390.732666015625
2024-08-30,381.5572835286458,392.5673319498698
2024-09-03,383.6373777843657,394.0279947916667
2024-09-04,385.3543769473121,394.4899922688802
2024-09-05,387.20294872465587,395.82732747395835
2024-09-06,387.90447387695315,393.40333251953126
2024-09-09,388.1873801095145,390.2900044759115
2024-09-10,388.4967129661923,388.37933553059895
2024-09-11,388.89828404017857,387.8353332519531
2024-09-12,389.4932378859747,388.67467041015624
2024-09-13,390.2791896275112,390.92266642252605
2024-09-16,391.78995099748886,395.640663655599
2024-09-17,392.59471304757255,397.1499979654948
2024-09-18,393.5161907377697,398.71800333658854
2024-09-19,394.6663325718471,400.7466654459635
2024-09-20,395.7971902029855,402.36533406575523
2024-09-23,396.9245247977121,403.66533813476565
2024-09-24,397.59985700334823,403.5139994303385
2024-09-25,398.527093796503,404.1793273925781
2024-09-26,399.2641877673921,404.079990641276
2024-09-27,399.8809020996094,403.76465861002606
2024-09-30,400.74766351609003,404.59132486979166
2024-10-01,401.469474429176,405.04266560872395
2024-10-02,401.99309416271393,404.7173360188802
2024-10-03,401.3864743187314,400.67933349609376
2024-10-04,400.9583798363095,397.93800252278646
2024-10-07,399.40223693847656,391.96400146484376
2024-10-08,397.4814262753441,386.26666259765625
2024-10-09,396.33894885835196,384.95399169921876
2024-10-10,395.29213954380583,385.10399373372394
2024-10-11,394.9606644403367,388.0313313802083
2024-10-14,394.7479502360026,391.3406656901042
2024-10-15,395.0935703822545,395.5933369954427
2024-10-16,396.1803334554036,400.990673828125
2024-10-17,396.9607155936105,403.94667561848956
2024-10-18,398.58985929943265,408.6406758626302
2024-10-21,399.71195547921315,410.3413431803385
2024-10-22,400.5632901146298,410.1800109863281
2024-10-23,401.56143275669643,410.1780069986979
2024-10-24,401.4761462983631,406.4126688639323
2024-10-25,398.04781159900483,391.36932983398435
2024-10-28,394.14581109909784,377.4719950358073
2024-10-29,390.86971697126114,368.54600016276044
2024-10-30,387.8306704566592,362.87000528971356

Answer: 6.0