Announcement

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

  • Creating Dummy Variables for Weekend and Holiday days

    I am comparing cryptocurrency prices against the FTSE 100 to measure the relationship. As the cryptocurrency market is open 24/7, they have data for the weekend and holiday days. However, as the FTSE is only open on working/weekdays, I have fewer data cells, so I cannot accurately compare the data at the corresponding dates of each other. Is there any way I can create a dummy variable so there is data for the weekend days of FTSE(whereby when there is a gap in the dates, it takes the previous closing price), or some way where I can ignore the data on the weekend for the cryptocurrency variables, so when I perform VAR it only includes the crypto dates that are the same as the FTSE dates. I have tried using just the dates of the FTSE however it does not capture the whole of the cryptocurrency datasets, and ignores the ones after the FTSE data is used. Any help is much appreciated.

  • #2
    Ben:
    welcome to this forum.
    If FTSE has some missing values corresponding to the NSE closing days, Stata will simply omit those observations via listwise deletion.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3


      Thank you for your response Carlo. When I use the data from 2018-2023 and perform VAR, it says that the dates observed are from the 4th January 2018 to 16th March 2022. This end date coincides with the date where the FTSE data ends, in correspondence to the cryptocurrency data dates that were used, as shown in the screenshot attatched so it makes it seem like it is just using the cryptocurrency data up until the data for the FTSE ends, hence why I wanted to add some sort of dummy variable for the weekends, so I could extend this and use all the data. Any further help is much appreciated. Thanks
      Attached Files

      Comment


      • #4
        Ben:
        my previous reply still holds.
        Probably, the safest way is to add missing dates manually, if feasible and rewarding fir your research goals.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment

        Working...
        X