What is the main distinction between .pct_change() and .shift()? They seem to act very similarly, but I am rather confused on why we need to use .shift() if .pct_change() tells us the Daily Close Return and that is what we are aiming at.
I appreciate any help.
Hello Joshua,
.pct_change() and .shift() are for entirely different purposes.
.pct_change() tells you the daily/bar percentage change.
.shift() on the other hand shifts the time series values ahead by 1 day/bar. This means that for any given date/time we have the value corresponding to the previous date/time.
You can read more about these functions here and here.