Results 1 to 3 of 3

Changing dimension matrix multiplication

Threaded View

  1. #1
    Forum Contributor
    Join Date
    03-04-2013
    Location
    Europe
    MS-Off Ver
    Office 365 ProPlus
    Posts
    147

    Changing dimension matrix multiplication

    I'm obtaining values of a portfolio by performing a matrix multiplication of asset prices and asset quantities/volumes.
    [Let's say the Prices matrix is of dimension 500 (rows) X 10 (columns), so essentially 500 days of data for 100 different assets. The quantities matrix is of dimension 1 (row) X 10 (columns). So the matrix multiplication will be mmult(prices,transpose(quantities)) Making the vector of portfolio values of dimension 500 (rows) X 1 (column).]

    The problem is that the Prices matrix will be continuously growing, as more and more data become available. I want to update the vector of portfolio values with a macro, so that the portfolio values vector grows if the Prices matrix have grown. I can make sure I have all price values in a matrix by making a named range using offset. BUT, how can i make the matrix multiplication when I don't know the size of the matrix?

    I was thinking you might be able to use "Evaluate", but i'm not quite sure how that works, any ideas?

    I've attached an example workbook. I would like to make a macro for the button (in the portfolio values sheet) that will update the portfolio values and the number of dates in the same sheet to match the number of rows in the prices sheet (you'll have to simulate the addition of values to the prices matrix yourself).

    There might be a much easier solution to this problem that i haven't thought of.. Any ideas are welcome. Thank you for your help!
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1