Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Merge weekly dates with quarterly dates

    Goodmorning,

    I'm working on a paper which talks about the generation of delta covar written by M.Brunnermeier. I have a problem.

    i must calculate the return on each bank in this way: X(i)= LEV(t)(i)ME(t)(i) - LEV(t-1)(i)ME(t-1)(i)/LEV(t-1)(i)ME(t-1)(i)

    where LEV = leverage = total assets/ book equity
    ME= market value of equity

    Leverage are in quarterly, instead of market value in weekly.
    Each time period (time t) - (t-1) is one week and hence the results for VaR and CoVaR are a prediction for one week ahead in time

    The date used to obtain time series of market valued total assets are weekly values of market capitalization and quarterly balance sheet data of book valued total assets and equity.

    I MUST MATCHED WEEKLY FREQUENCY WITH INTERPOLATED VALUES OF THE QUARTERLY BALANCE SHEET DATA, but i don't know the right codes to do it.

    ID WeeklyDate ME ID QuarterlyDate Leverage
    1 08/01/2002 8,30 1 2002Q1 13,48579
    2 15/01/2002 8,52 2 2002Q2 14,53573
    3 ...... 3 2002Q3 13,29393
    4 ...... 4 ....


    I must created this, (i suppose) and then calculate X(i)

    ID WeeklyDate ME QuarterlyDate Leverage

    1 08/01/2002 8,30 2002Q1 13,48
    2 15/01/2002 8,52 2002Q1 13,48
    3
    4

    Someone can help me? thanks





  • #2
    till now i use the code: gen long WeeklyDate2 = qofd(WeeklyDate)
    formar (WeeklyDate) % tq

    Comment


    • #3
      Nick Cox Could you help me?

      Comment


      • #4
        Please don't ping people. Let them decide whether to answer.

        Here you start with several financial definitions that don't register with me, as I don't work anywhere near that field.

        But the idea of getting a quarterly date out of a daily date by qofd() seems fine. Adding to that would require too much guesswork on my part.

        Comment


        • #5
          Clyde Schechter coul you help me?

          Comment


          • #6
            Please don't ping people. Let them decide whether to answer.
            Still my advice.

            Comment


            • #7
              OK Nick, thanks

              Comment


              • #8
                Someone may be able to help you if you provide a better example. As it stands, it appears that you are just replacing the value of LEV in the first two observations with a rounded value of the first observation's value, and nothing else changes. This doesn't relate in any clear way to "interpolated values of the quarterly balance sheet data."

                First of all, bring your data into Stata if you haven't already done so. Then use the -dataex- command to post a fuller example of the data. In particular, without seeing a sequence of observations on the same id, it's impossible to see how this is working. So show a data example with several id's and several weekly/quarterly/or whatever it is you have observations on each. Then do a hand calculation of what result you would like to get and post that as well. If you are not familiar with the -dataex- command, item #12 of the FAQ will explain it to you. I will say here only that it is the most helpful way to show example data sets on this forum. While you are there, read the entire Forum FAQ (not just #12) as it contains excellent advice on asking clear questions. If you follow the advice in the FAQ you are more likely to get a timely and helpful response.

                Comment

                Working...
                X