Announcement

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

  • Daily data preparation with different weekend days

    I am trying to prepare daily time series for two stock market: NYSE and Kuwait Stock Exchange (KSE).
    The problem is that the 1st weekday in Kuwait is Sunday. Friday and Saturday are off.
    The 1st weekday in USA is Monday and Saturday and Sunday are off.
    Any suggestion on daily data preparation is appreciated. Thanks.

    Talla.

  • #2
    There is no data to work on. You may create a variable which is 1 according to a - if clause, etc.
    Best regards,

    Marcos

    Comment


    • #3
      Stata's business calendar commands may be useful (help bcal). In particular, bcal create automatically creates a business calendar file from your data, where business days are automatically inferred. The business calendar file can then be refined manually, if need be.

      I hope this helps.

      -- Kreshna

      Comment


      • #4
        Thank you both.
        I will check the (help bcal)

        Comment


        • #5
          Dear Marcos,

          I am attaching my data in excel file format for easier access.
          My goal is synchronize dates to reflect same day in all three markets.
          I intend to investigate price volume relationship in terms of volatility before and after the 2008 crisis.

          Variables are:

          No = 1 for NASDQ, 2 for Kuwait, and 3 for Saudi Arabia
          Crisis = 0 for before the crisis and 1 for after the crisis
          Date
          Close = the closing index at end of the day
          Volume = the traded volume of the day


          Attached Files

          Comment


          • #6
            excel format is not easy access. Many people refuse to open such dataset from random persons on the internet to avoid viruses. That is why you should use dataex to paste an extract from your data into the message.
            ---------------------------------
            Maarten L. Buis
            University of Konstanz
            Department of history and sociology
            box 40
            78457 Konstanz
            Germany
            http://www.maartenbuis.nl
            ---------------------------------

            Comment


            • #7
              Please do read the FAQ. There you will find the information about sharing data/command/output in this forum. Also, please inform whether you followed the advice given in #3.
              Best regards,

              Marcos

              Comment


              • #8
                I forgot to say that I will be doing volatility spillover between markets. It is known that the stock markets of Kuwait and Saudi Arabia (K&SA) are highly correlated with US market. Synchronization of the daily data is a must. Is it a viable solution to cancel out weekend days for the three markets? But again a working day in US like Friday is a holiday in K&AS. In this case the daily content of this day in the US won't be reflected until Sunday which is a working day in the K&SA and a holiday in US. Any suggestions on this problem? Please. Excel data file is attached earlier.

                Comment


                • #9
                  This a sample of the of my data using dataex

                  [CODE]
                  * Example generated by -dataex-. To install: ssc install dataex
                  clear
                  input byte(No Crisis) int Date double(Close Volume)
                  1 1 20716 4796.069824 1791120000
                  1 1 20713 4818.049805 3013860000
                  1 1 20712 4819.899902 1950940000
                  1 1 20711 4746.060059 1902680000
                  1 1 20710 4722.850098 2071460000
                  1 1 20709 4764.649902 2007610000
                  1 1 20706 4681.540039 2208690000
                  1 1 20705 4804 1839790000
                  1 1 20704 4831.859863 1878460000
                  1 1 20703 4829.509766 1777940000
                  1 1 20699 4798.740234 1.4742e+09
                  1 1 20698 4783.939941 1592520000
                  1 1 20697 4771.060059 1761770000

                  Comment


                  • #10
                    You need to have the data information between code delimiters. The comments in #8 indicate that, instead of needing a specific command to create a given variable, you haven't yet decided about the theoretical solution for the study design. Since the topic is far from my field, I cannot help you with that decision.
                    Best regards,

                    Marcos

                    Comment


                    • #11
                      Thanks

                      Comment

                      Working...
                      X