Stock Exchange Price

NOCODING AI
NOCODING AI
Published in
6 min readFeb 1, 2023

for more info => pro.nocodingai.com

This tutorial is an implementation based on an article posed in TOWARDS DATA SCIENCE
Please check the link below for more details.

https://towardsdatascience.com/stock-price-prediction-system-using-1d-cnn-with-tensorflow-js-machine-learning-easy-and-fun-fe5323e68ffb

Presentation

In this tutorial, we want to train an artificial intelligence model that predicts the stock price of D+1 using the convolutional layer.

Let us follow these steps:

1- Loads the data required for training.
2- Process the loaded data to fit the model through a data preprocessor.
3- Defines the architecture of the model.
4- Train the model, monitor the process.

Things you will learn:

- How to preprocess data in nocodingAI
- How to define an artificial intelligence model architecture in nocoding AI
- To infer using models trained in nocodingAI
- A necessary thing
- Latest version of chrome or other newer browsers
- Be familiar with the basic usage of nocoding AI.
- Refer to the Getting Started Guide for basic usage introduction or learning.
- Create Project
- First, create a new project.

Click App Builder in the left menu to go to the project screen.

Then, select Create New.

At this page, fill the blank title as “stock_price” and Descriptions as “Stock price model using CNN”. Then, click on Create empty.

NB: you can fill the blanks as you see fit.

Great !

Now, it is time to upload your data. Clean on Data Cleaner on the left side bar. Then, click on Create New button.

On the Create Dataset, fill the Dataset Name with let’s say stock_close_price. The description blank is up to you. Then, select the Data type as CSV.

You can now see the Dataset of Apple Inc. Close price. Click on Use sample.

Success ! You have created your dataset.

Now open it. You will now access all the data and choose to display it in 10,30,50 or even 500 rows.

In that case, our data is already preprocessed. Therefore we do not need to set the Preprocessing parameters.

Click on the disquette icon to save your work.

Almost set !

Now we need to build the AI model that will analyze and process your data.

Click on Model Designer on the left side bar and on Create New.

Fill the Model Name and Description blanks and click on Create empty button inside the Empty Model.

Success ! Continue.

On the following screen, click on Datasets to acess My Datasets and click on stock_close_price.

On the left side, roll down until Input/Output and click-> ‘InputLayer’ and ‘Output’, check new nodes, and input 7,1 to the shape box on ‘InputLayer’ node.

Keep rolling down unril you reach Convolutional. Click on Conv1D and the node will appear on the right part.

The architecture is ‘Inputlayer’ -> ‘conv1d’ -> ‘averagePooling1d’ -> ‘conv1d’ -> ‘averagePooling1d’ -> ‘flatten’ -> ‘dense’ -> ‘Output’. So, on the left side, click ‘Convolutional’ -> ‘conv1d’, ‘Pooling’-> ‘averagePooling1d’, ‘Basic’ -> ‘flatten’, ‘Basic’ -> ‘Dense’, check nodes and make a connection.

Last part !

Finally, click on Start Training. You should get the following screen:

The final stage is setting Training Parameters. Set the parameters as on the screenshot. Input Type and Output Type should be as TEXT, optimizer as ‘ADAM’, Loss Function as ‘meanSquaredError’ and Metrics as ‘mse’ (‘meanSquaredError’). Also, adjust the learning rate on 0.001, epochs on 100, and Batch size on 128. Turn on ‘Use GPU’.

Then click ‘Start Training’ button.

Success ! Continue.

Our model stock_price has been trained !

Now let us go back to App Builder and open stock_price.

Time to drag&drop!

Select Input(Text) in Input methods, and drop it onto the Empty Screen. You should get something like this:

On the right side, in the Model Detail part, click on the green button select. We are going to select which data we want. It is better to select Epoch 100 because the last data is the better trained.

Once you selected your Epoch, you must set Use Input under each col-number and type manully the following values : 174.56 for col-0, 179.45 for col-1, 175.74 for col-2, 174.33 for col-3, 179.30 for col-4, 172.26 for col-5 and 171.14 for col-6.

Then, under the Input type title, click on the text bar besides TEXT and choose ab7a3887 beneath Select Input ID.

You should now have all the value of your 6 columns appear on the Input component.

Now back to the Element side column. Drag &Drop the Output(Rows) node below the Input node.

Now, under the Output type (right part), select 75b9ebb2 on the text bar besides TEXT

Now you need your dataset values. Click on Data Cleaner and select your dataset. Pick one line. Let us say line 2. The value for col-0 is 0.05132711996560706, the value for col-1 is 0.05127591231650066, etc

you will need these values for later.

then go back to App Builder et click on the Published node with the icon.

You will access the screen below:

Remember the dataset values ? You will enter them in the blank bars accordingly:

That’s it ! You don’t have to type a single line of code.

--

--