# Selecting Sampling Frequency for Welch Power Spectral Density plot for a daily frequency financial time series data on Python

I have obtained daily close price stock data ( and transformed them to logarithmic returns series data) from a Stock Exchange between 2 financial years, and I wish to generate a power spectral density to study its behaviour.

I work on Python , I went to the documentation of Scipy.Signal.Welch : https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.welch.html#r34b375daf612-1

Under parameter documentation it is written : fs: float, optional Sampling frequency of the x time series. Defaults to 1.0

I can not figure a way out to find a sampling frequency for the daily frequency financial time series data which I have. (my time series data is daily date indexed i.e. 12/1/2023 is the date and corresponding close price value is attached.)

Also if possible could the experts on this forum explain the parameters mentioned in documentation mean : window , nperseg, noverlap and what should be their recommended settings values for daily frequency financial time series data and returns series data.

Since your data is the daily fluctuations your sampling rate would be 1 sample/day assuming you are working with contiguous trading days. It really doesn't matter what rate you use, it just normalizes the frequency axis in the resulting power spectral density (PSD): The PSD extends to $$\pm 0.5 f_s$$ where $$f_s$$ is the sampling rate in any units you choose. So if you let it proceed with the default of $$f_s=1$$ (which is consistent with a normalized sampling rate of 1 sample per cycle) then the PSD horizontal axis will extend from -0.5 to +0.5 for a two-sided spectrum, or 0 to +0.5 for a one-sided spectrum (since for real data the negative side would be redundant so needn't be shown).