say I have a signal, which includes some form of inflationary price, but I don't know the inflation rate other than it's "quite likely linear" (by observation only), is there a better way to remove this inflation than the script below:

Code:
clear
set obs 1000
gen signal=_n*0.01+runiform()
gen date=_n+14610
format %td date
tsset date
regress signal date
gen signalwithoutinflation=signal-(date*_b[date])+_b[_cons]
tsline signalwithoutinflation
Let me know if this makes sense.