raphael wrote:I am running a "do" loop which produces results at each iteration; how can I make RATS write the output (which is a series), at each iteration, to a new line or column in the same output file (if possible, an Excel file) ? For example, if I have a loop such as do i = 1, 24, the output file in the end would have 24 lines or columns. Thanks!
dec vect[series] copydata(24)
do i=1,24
...
set copydata(i) = data generated on i
end do i
copy(format=xls,org=columns) / copydataopen copy betas.lst
data(format=rats) / market
do i=1,ntickers
labels 1
# tickers(i)
clear 1
data(format=rats) / 1
linreg(noprint) 1
# constant market
display(unit=copy) tickers(i) @20 ##.##### %beta(2)
end do i
close copyReturn to Other RATS Usage Questions
Users browsing this forum: No registered users and 1 guest