about 1 month ago
I am very new to python, in fact this is my first code in python.
I am attempting to find the covariance matrix for 4 rows of data with each element having a decreasing weight datewise
I have performed the calculations on excel already, and a snapshot of how the data looks is like is below:
I need to calculate the covariance matrix in the following format:
I have to use python where i have calculated the returns and the weights
to find the covariance matrix.
I would appreciate any help thank you
import pandas as pd
import numpy as np
xl = pd.ExcelFile('path+file.xlsx')
df = xl.parse('Sheet 1')
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
© copyright 2014 FindNerd.com. All rights reserved.
Sign up using