You are not logged in. You can browse but not post. Login or Register by clicking 'Login or Register' at the top-right of this page. For more information on Statalist, see the FAQ.
Please read and follow https://www.statalist.org/forums/help including #13 on references. Did you Google or search in Stata given your author names?
Sorry I did not clearly understand you. I have been googling for quite sometime "how to calculate momentum strategies in STATA"? I got few codes but still there are some confusion left. I need somebody's help that could just briefly explain the methodology in steps.
Let me try to elaborate Nick's comment. First, follow the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex. if you want to refer to a paper, give us a proper reference, not just authors and year. Assume we are not from your area of study and may be unwilling to read a paper just to help you. So if you want us to help you calculate something, you'll need to tell us what you want to calculate (and your initial efforts at the calculation).
Let me try to elaborate Nick's comment. First, follow the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex. if you want to refer to a paper, give us a proper reference, not just authors and year. Assume we are not from your area of study and may be unwilling to read a paper just to help you. So if you want us to help you calculate something, you'll need to tell us what you want to calculate (and your initial efforts at the calculation).
Dear Phil, I have the following code for J6K6 strategy. Can you please help me to find out any mistake in my code. I just want a comment. When I try to do it on Excel, I am lost while doing loser portfolio.
gen mdate = date(date, "DM20Y")
format mdate %tm
xtset code mdate
bysort code: gen returns = 100*((prices[_n]-prices[_n-1])/prices[_n-1])
I have to calculate the momentum of stock returns, based on the eleven-month return starting twelve months prior to the measurement month and ending one month prior to that month. I used your code, but I was wondering if could verify if it is correct:
The above code suffers from several issues. It will not only take hours or days to complete due to the slow processing of the xtile command, but it also ignores the time series dimensions as it uses hard-coded observation gaps. Further, it ignores the overlapping dimension as mentioned in the Jegadesh and Titman paper.
Since such strategies involve the overlapping formation and holding periods, the steps are usually more complicated than shown above in post #5. I have developed a customized Stata program, called asm.ado. This program offers lots of options related to momentum strategies. The program is available for a nominal fee. You can see further details here on my website https://fintechprofessor.com/stata-p...um-portfolios/
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