script to compute DBA for a time series