Announcement

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

  • Annual and Monthly Stock Prices

    Dear All

    Hope you are well.

    I am working on some share prices and I would really appreciate some help here.

    I am working with daily share prices and I want to extract or tag the relevant observations for each Firm:
    1. Annual share price opening/closing
    2. Monthly share price opening/closing

    Part of my dataset is below:

    input float ID str10(TIMEPERIOD OPENING CLOSING HIGH LOW)
    1 "1/1/2019" "24.7" "24.75" "24.75" "24.65"
    1 "1/2/2019" "24.75" "24.83" "24.88" "24.71"
    1 "1/3/2019" "24.83" "24.85" "24.9" "24.79"
    1 "1/4/2019" "24.85" "24.86" "24.89" "24.79"
    1 "1/7/2019" "24.86" "24.85" "24.97" "24.81"
    1 "1/8/2019" "24.85" "24.83" "24.91" "24.75"
    1 "1/9/2019" "24.83" "24.87" "24.92" "24.81"
    1 "1/10/2019" "24.87" "24.97" "25.01" "24.91"
    1 "1/11/2019" "24.97" "25.06" "25.13" "24.91"
    1 "1/14/2019" "25.06" "25.11" "25.14" "25.01"
    1 "1/15/2019" "25.11" "25.17" "25.21" "25.11"
    1 "1/16/2019" "25.17" "25.18" "25.22" "25.14"
    1 "1/17/2019" "25.18" "25.23" "25.28" "25.16"
    1 "1/18/2019" "25.23" "25.3" "25.49" "25.16"
    1 "1/21/2019" "25.3" "25.37" "25.44" "25.26"
    1 "1/22/2019" "25.37" "25.34" "25.41" "25.31"
    1 "1/23/2019" "25.34" "25.46" "25.5" "25.37"
    1 "1/24/2019" "25.46" "25.48" "25.53" "25.42"
    1 "1/25/2019" "25.48" "25.49" "26.5" "25.43"
    1 "1/28/2019" "25.49" "25.5" "25.54" "25.46"
    1 "1/29/2019" "25.5" "25.56" "25.6" "25.51"
    1 "1/30/2019" "25.56" "25.54" "25.6" "25.51"
    1 "1/31/2019" "25.54" "25.56" "25.6" "25.51"
    2 "1/4/2005" "69.85" "68.5" "68.5" "68.5"
    2 "1/5/2005" "68.5" "72" "72" "65.5"
    2 "1/6/2005" "72" "71" "73.95" "70"
    2 "1/7/2005" "71" "68.2" "72" "68.2"
    2 "1/10/2005" "68.2" "68.5" "69" "68.5"
    2 "1/11/2005" "68.5" "70.5" "73" "70.5"
    2 "1/12/2005" "70.5" "67" "68" "67"
    2 "1/13/2005" "63.5" "66" "66" "65.25"
    2 "1/17/2005" "66" "65" "65" "65"
    2 "1/18/2005" "65" "66" "66" "66"


    Looking forward to your kind reply.

    Thank you

    Yahya Ghazali



  • #2
    You may like to try ascol.
    Code:
    ssc install ascol
    help ascol
    More on ascol can be read here https://fintechprofessor.com/ascol-s...y-and-monthly/
    Regards
    --------------------------------------------------
    Attaullah Shah, PhD.
    Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
    FinTechProfessor.com
    https://asdocx.com
    Check out my asdoc program, which sends outputs to MS Word.
    For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

    Comment


    • #3
      Thanks for this!

      Comment

      Working...
      X