# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

import bulbea as bb
share = bb.Share('WIKI', 'GOOGL')

share.data

from bulbea.learn.evaluation import split

Xtrain, Xtest, ytrain, ytest = split(share, 'Close', normalize = True)

Xtrain.shape

Xtest.shape

Xtrain[0]

# %matplotlib inline
share.plot(bollinger_bands = True, period = 100, bandwidth = 2)

import numpy as np

Xtrain = np.reshape(Xtrain, (Xtrain.shape[0], Xtrain.shape[1], 1))

Xtest  = np.reshape( Xtest, ( Xtest.shape[0],  Xtest.shape[1], 1))

from bulbea.learn.models import RNN

rnn = RNN([1, 100, 100, 1]) # number of neurons in each layer

rnn.model.summary()

Xtrain.shape

Xtest.shape



StarcoderdataJupyterScriptsDedupFiltered