1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Excel Macro [to calculate the financial momentum profits]

Discussion in 'Other PC Software' started by suchen, 2007/01/26.

  1. 2007/01/26
    suchen

    suchen Inactive Thread Starter

    Joined:
    2007/01/26
    Messages:
    3
    Likes Received:
    0
    hi, is this forum able to help me write Excel Macro about how to calculate the financial momentum profits? if so , i will provide all details on what i want!

    Many thanks !

    thanks ReggieB!!!

    maybe i didnt clearly express what i am looking for!
    i gave another simpler example as below:

    if i have data in
    A1 B1 C1
    A2 B2 C2
    A3 B3 C3 D3 E3 F3
    A4 B4 C4
    A5 B5 C5
    A6 B6 C5

    first i want to creat the sum of A1:A3 in D3,
    the sum of B1:B3 in E3,
    the sum of C1:C3 in F3;

    then I will find the Max of D3:F3,
    if D3 is the Max, then we creat the sum of A4:A6,
    if E3 is the Max, then we creat the sum of B4:B6,
    if F3 is the Max, then we creat the sum of C4:C6

    I really appreciate if u can give the help!!!!
    my eamil : chen.su AT liv.ac.uk
     
    Last edited: 2007/01/27
  2. 2007/01/26
    Steve R Jones

    Steve R Jones SuperGeek Staff

    Joined:
    2001/12/30
    Messages:
    12,317
    Likes Received:
    252
    It's possible someone here can help. Go ahead and post your question.
     

  3. to hide this advert.

  4. 2007/01/26
    suchen

    suchen Inactive Thread Starter

    Joined:
    2007/01/26
    Messages:
    3
    Likes Received:
    0
    the detalis of momentum

    Hi, everyone

    Thanks first!

    I am doing the research on Momentum in the stock market. If investors buy past winner stocks and short sell past loser stocks, they will earn abnormal returns in the future. This effect is called ‘Momentum’.

    The momentum strategies are not that complex, but it is impossible to calculate the Momentum Profits manually. I know Excel Macro is a good tool to help me do this job. But I am just a beginner of Excel. I really appreciate if someone can offer me help. Thanks in advance!

    The momentum strategy is:

    We have ten columns, 60 rows, monthly return data from Jan 2001 to Dec 2005. Each column represents a stock.

    The base period of this strategy starts from Jan 2002 and ends in Dec 2004. In each month, we need to do the following replicated job

    1, we calculate the returns (sum) of past three months in each column, and then choose the MAX and MIN;

    2, in the column with MAX return and MIN return, we calculate the returns (sum) of the following three months, respectively.

    I think it is not a big deal for experienced people. Thanks a lot!
     
    Last edited: 2007/01/26
  5. 2007/01/26
    ReggieB

    ReggieB Inactive Alumni

    Joined:
    2004/05/12
    Messages:
    2,786
    Likes Received:
    2
    if you have data in cells A1, A2, and A3 you could create the sum of those cells in A4 with the code:
    Code:
    =sum(A1:A3)
    The cell reference are relative. This is in effect saying "give me the sum of the three cells to the left of A4 ". So if you drag or copy the contents of A4 to B4 the code will automatically change to:
    Code:
    =sum(B1:B3)
    If you wanted the MIN in A5, the code for cell A5 would be
    Code:
    =min(A1:A3)
    To put MAX in A6 insert the code
    Code:
    =max(A1:A3)
     
  6. 2007/01/26
    suchen

    suchen Inactive Thread Starter

    Joined:
    2007/01/26
    Messages:
    3
    Likes Received:
    0
    Thanks ReggieB!!

    thanks ReggieB!!!

    maybe i didnt clearly express what i am looking for!
    i gave another simpler example as below:

    if i have data in
    A1 B1 C1
    A2 B2 C2
    A3 B3 C3 D3 E3 F3
    A4 B4 C4
    A5 B5 C5
    A6 B6 C5

    first i want to creat the sum of A1:A3 in D3,
    the sum of B1:B3 in E3,
    the sum of C1:C3 in F3;

    then I will find the Max of D3:F3,
    if D3 is the Max, then we creat the sum of A4:A6,
    if E3 is the Max, then we creat the sum of B4:B6,
    if F3 is the Max, then we creat the sum of C4:C6

    I really appreciate if u can give the help!!!!
    my eamil : chen.su AT liv.ac.uk
     
    Last edited: 2007/01/27
  7. 2007/01/30
    ReggieB

    ReggieB Inactive Alumni

    Joined:
    2004/05/12
    Messages:
    2,786
    Likes Received:
    2
    In D3
    Code:
    =SUM(A1:A3)
    In E3
    Code:
    =SUM(B1:B3)
    In F3
    Code:
    =SUM(C1:C3)
    Then in the field where you want the max
    Code:
    =MAX(D3:F3)
    Or you could just put this in the field:
    Code:
    =MAX(SUM(A1:A3), SUM(B1:B3), SUM(C1:C3))
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.