<jupyter_start><jupyter_text>Generate real white noise<jupyter_code>mean = 0
std = 1
num_samples = 5000
samples = numpy.random.normal(mean, std, size=num_samples)

whitenoise = pd.DataFrame(samples)
whitenoise
white_noise_df = pd.DataFrame()
for i in range(1,5000):
    p_value = diag.acorr_ljungbox(whitenoise, lags=[i], boxpierce=True,return_df=True)
    white_noise_df = white_noise_df.append(p_value)
white_noise_df['lb_pvalue'].plot().axhline(y=0.05)
from scipy import signal
freqs,times,spectrogram = signal.spectrogram(whitenoise)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11816578483245149, 'fraction_numerical': 0.024691358024691357, 'mean_word_length': 8.015873015873016, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '277779', 'license': 'MIT', 'n_tokens_mistral': 233, 'n_tokens_neox': 220, 'n_words': 35, 'path': 'Backtesting/whitenoise_test.ipynb', 'repo_name': 'ArthurWangNet/Trading', 'size': '567'}