fix BUG: ValueError when performing rolling covariance on multi indexed DataFrame
State: closed

 - [x] tests added / passed


Proposed fix for #16789. Using class properties (with implemented setter/getter) rather than field variables.

Labels:
name: Bug
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations
name: MultiIndex

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=h1) Report
> Merging [#16814](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/e5fd3e023c52c6756fa83604c5909cc102808fdc?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/16814/graphs/tree.svg?width=650&src=pr&token=eZ4WkYLtcO&height=150)](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #16814      +/-   ##
==========================================
+ Coverage   90.94%   90.94%   +<.01%     
==========================================
  Files         161      161              
  Lines       49272    49272              
==========================================
+ Hits        44810    44811       +1     
+ Misses       4462     4461       -1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.71% <ø> (ø)` | :arrow_up: |
| #single | `40.17% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/window.py](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvd2luZG93LnB5) | `96.49% <ø> (ø)` | :arrow_up: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.33% <0%> (+0.09%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=footer). Last update [e5fd3e0...6c9079a](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=h1) Report
> Merging [#16814](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/e5fd3e023c52c6756fa83604c5909cc102808fdc?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/16814/graphs/tree.svg?token=eZ4WkYLtcO&width=650&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #16814      +/-   ##
==========================================
+ Coverage   90.94%   90.94%   +<.01%     
==========================================
  Files         161      161              
  Lines       49272    49272              
==========================================
+ Hits        44810    44811       +1     
+ Misses       4462     4461       -1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.71% <ø> (ø)` | :arrow_up: |
| #single | `40.17% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/window.py](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvd2luZG93LnB5) | `96.49% <ø> (ø)` | :arrow_up: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.33% <0%> (+0.09%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=footer). Last update [e5fd3e0...6c9079a](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=h1) Report
> Merging [#16814](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/e5fd3e023c52c6756fa83604c5909cc102808fdc?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/16814/graphs/tree.svg?src=pr&width=650&height=150&token=eZ4WkYLtcO)](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #16814      +/-   ##
==========================================
+ Coverage   90.94%   90.94%   +<.01%     
==========================================
  Files         161      161              
  Lines       49272    49272              
==========================================
+ Hits        44810    44811       +1     
+ Misses       4462     4461       -1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.71% <ø> (ø)` | :arrow_up: |
| #single | `40.17% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/window.py](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvd2luZG93LnB5) | `96.49% <ø> (ø)` | :arrow_up: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.33% <0%> (+0.09%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=footer). Last update [e5fd3e0...8782abb](https://codecov.io/gh/pandas-dev/pandas/pull/16814?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Thanks!