Spotify Data Analysis

Last Updated on May 3, 2021

About

It is a Data Analysis Project. A data analysis of songs played on Spotify between the years 2010 2019.

Tools Used: Tableau

More Details: spotify Data Analysis

Submitted By


Share with someone who needs it

Binance Trading Bot | Built With React.Js

Last Updated on May 3, 2021

About

Automated Binance trading bot with trailing buy/sell strategy

How it works


Trailing Buy/Sell Bot

This bot is using the concept of trailing buy/sell order which allows following the price fall/rise.

  • The bot can monitor multiple symbols. Each symbol will be monitored per second.
  • The bot is only tested and working with USDT pair in the FIAT market such as BTCUSDT, ETHUSDT. You can add more FIAT symbols like BUSD, AUD from the frontend. However, I didn't test in the live server. So use with your own risk.
  • The bot is using MongoDB to provide a persistence database. However, it does not use the latest MongoDB to support Raspberry Pi 32bit. Used MongoDB version is 3.2.20, which is provided by apcheamitru.


Buy Signal

The bot will continuously monitor the lowest value for the period of the candles. Once the current price reaches the lowest price, then the bot will place a STOP-LOSS-LIMIT order to buy. If the current price continuously falls, then the bot will cancel the previous order and re-place the new STOP-LOSS-LIMIT order with the new price.

  • The bot will not place a buy order if has enough coin (typically over $10 worth) to sell when reaches the trigger price for selling.

Buy Scenario

Let say, if the buy configurations are set as below:

  • Maximum purchase amount: $50
  • Trigger percentage: 1.005 (0.5%)
  • Stop price percentage: 1.01 (1.0%)
  • Limit price percentage: 1.011 (1.1%)

And the market is as below:

  • Current price: $101
  • Lowest price: $100
  • Trigger price: $100.5

Then the bot will not place an order because the trigger price ($100.5) is less than the current price ($101).

In the next tick, the market changes as below:

  • Current price: $100
  • Lowest price: $100
  • Trigger price: $100.5

The bot will place new STOP-LOSS-LIMIT order for buying because the current price ($100) is less than the trigger price ($100.5). For the simple calculation, I do not take an account for the commission. In real trading, the quantity may be different. The new buy order will be placed as below:

  • Stop price: $100 * 1.01 = $101
  • Limit price: $100 * 1.011 = $101.1
  • Quantity: 0.49

In the next tick, the market changes as below:

  • Current price: $99
  • Current limit price: $99 * 1.011 = 100.089
  • Open order stop price: $101

As the open order's stop price ($101) is higher than the current limit price ($100.089), the bot will cancel the open order and place new STOP-LOSS-LIMIT order as below:

  • Stop price: $99 * 1.01 = $99.99
  • Limit price: $99 * 1.011 = $100.089
  • Quantity: 0.49

If the price continuously falls, then the new buy order will be placed with the new price.

And if the market changes as below in the next tick:

  • Current price: $100

Then the current price reaches the stop price ($99.99); hence, the order will be executed with the limit price ($100.089).


Sell Signal

If there is enough balance for selling and the last buy price is recorded in the bot, then the bot will start monitoring the sell signal. Once the current price reaches the trigger price, then the bot will place a STOP-LOSS-LIMIT order to sell. If the current price continuously rises, then the bot will cancel the previous order and re-place the new STOP-LOSS-LIMIT order with the new price.

  • If the coin is worth less than typically $10 (minimum notional value), then the bot will remove the last buy price because Binance does not allow to place an order of less than $10.
  • If the bot does not have a record for the last buy price, the bot will not sell the coin.


Sell Scenario

Let say, if the sell configurations are set as below:

  • Trigger percentage: 1.05 (5.0%)
  • Stop price percentage: 0.98 (-2.0%)
  • Limit price percentage: 0.979 (-2.1%)

And the market is as below:

  • Coin owned: 0.5
  • Current price: $100
  • Last buy price: $100
  • Trigger price: $100 * 1.05 = $105

Then the bot will not place an order because the trigger price ($105) is higher than the current price ($100).

If the price is continuously falling, then the bot will keep monitoring until the price reaches the trigger price.

In the next tick, the market changes as below:

  • Current price: $105
  • Trigger price: $105

The bot will place new STOP-LOSS-LIMIT order for selling because the current price ($105) is higher or equal than the trigger price ($105). For the simple calculation, I do not take an account for the commission. In real trading, the quantity may be different. The new sell order will be placed as below:

  • Stop price: $105 * 0.98 = $102.9
  • Limit price: $105 * 0.979 = $102.795
  • Quantity: 0.5

In the next tick, the market changes as below:

  • Current price: $106
  • Current limit price: $103.774
  • Open order stop price: $102.29

As the open order's stop price ($102.29) is less than the current limit price ($103.774), the bot will cancel the open order and place new STOP-LOSS-LIMIT order as below:

  • Stop price: $106 * 0.98 = $103.88
  • Limit price: $106 * 0.979 = $103.774
  • Quantity: 0.5

If the price continuously rises, then the new sell order will be placed with the new price.

And if the market changes as below in the next tick:

  • Current price: $103

The the current price reaches the stop price ($103.88); hence, the order will be executed with the limit price ($103.774).


Frontend + WebSocket

React.js based frontend communicating via Web Socket:

  • List monitoring coins with buy/sell signals/open orders
  • View account balances
  • Manage global/symbol settings
  • Delete caches that are not monitored
  • Link to public URL
  • Support Add to Home Screen


More Details: Binance Trading Bot | Built with React.js

Submitted By


Image Classification Using Machine Learning

Last Updated on May 3, 2021

About

This is a prototype that shows the given specific image will belong to which category. Here any images can be taken to classify the difference. The main theme is to predict that the given image will belong to which category we had considered.

In this prototype I downloaded images of three different dog breeds named Doberman, golden retriever and shihtzu. The first step is to preprocess data which basically means converting the images into an numpy array and this process named as flattening the image. This numpy array should be the input of the image.


After preprocessing the data, the next step is to check the best suitable parameters for the machine learning algorithm. After getting the parameters, I passed them into the machine learning algorithm as arguments and fit the model. From Sklearn import classification report, accuracy score, confusion matrix which helps us to get brief understanding about our model. The model can be loaded into file using pickle library.


Now the last step is to predict the output. For this I took a input field which takes a URL as an input. The URL should be the image of the dog for which the output is predicted. In the same way we have to flatten the image into a numpy array and predict output for that. The output will show the predicted output that is which breed that the dog belongs to and the image we are checking the output for.


The main theme of this project is to train the computer to show the difference between different classes considered.

More Details: Image Classification using Machine learning

Submitted By


Resistar

Last Updated on May 3, 2021

About

Augmented Reality Circuit Visualizer and Solver.

Categories Won

TartanHacks Grand Prize

Facebook Company Prize

Attempted Prize Categories

Duolingo’s Social Impact Prize (Educational)

GoDaddy’s Social Impact Prize (“Best app that improves STEM education”)

Inspiration

Long hours spent on ECE problem sets and frustration visualizing convoluted circuits caused these four CMU undergrads to create a circuit visualization system that would also help them solve circuits. A member of the team is currently in the intro ECE course: "Well it's not bad, I guess." - Team Member

What it does

ResistAR is an Augmented Reality Circuit Visualizer and Solver. A user can place down circuit elements in parallel and series configurations and ResistAR will solve the current through and voltage across each element of the circuit. It gives the user an easy way to see (sharp) the circuit.

How we built it

We first began with 3D printed chassis for the VuMark targets. These targets are identified and parsed by the program and cross checked against our cloud database on Vuforia. We then created 3D, textured, models in Blender that will hover over the VuMark targets. We then wrote the code in Unity that will calculate voltage and current values using concepts from vector calculus and matrix algebra.

Challenges we ran into

The math was very difficult and attempting to rush a 3D printed design was also difficult but there was a rush because 3D printing would be a very time consuming process. Thus we also had to create a lot of our latter designs around the already 3D printed parts. VuMarks were also difficult to create. VuMarks must be very easily distinguishable from each other and non-symmetric along any axis, and therefore took a while to get finely tuned and calibrated. Finally the math was a very difficult thing to visualize. We had to go from 3D space to 2D space and there were some difficulties with projections. The coders did end up writing relatively bug-free code, but not before a long, arduous thinking process.

Accomplishments that we're proud of

The two logic/algorithm gods that we had on our team solved an extremely complex math problem very quickly. Also our 3D printed parts are actually fire though. Just saying.

What we learned

Two 5 hour energies in 72 hours is actually not as bad an idea as some might think. Math is hard.

What's next for ResistAR

Norton and Thevenin Equivalents. Yikes.

More Details: ResistAR

Submitted By


Cert-It!

Last Updated on May 3, 2021

About

Cert It! is a web based and android based app that aims to provide and generate certificates over a range of many templates that can be chosen by the user. The user can enter his or her details through a .csv or .xlsx file (containing data in a predefined format having multiple users) or they can list out their own requirements to generate a single certificate.


Problem Statement

There are numerous companies and organizations out there that are providing certificates to their participants / winners. Sometimes , even educational organizations have to provide a load of generated certificates to their people. This process gets pretty hectic since its a very repetitive task.


Solution

Cert It! aims to solve this problem. We are providing an all round elucidation into this issue by providing an idea that automates these tasks & at the same time keep it user friendly. Through this application we want to provide our users with

  • Sample templates of our own on which they can choose and select the best possible fit for their organization and participants.
  • Allow the user to upload their own template and generate certificates.
  • Allow the user to upload a snapshot of the handwritten data in a specified format through which our app will recognize the necessary details and map it out to generate a certificate.


More Details: Cert-It!

Submitted By


Regression Analysis On Wallmart Sales Data

Last Updated on May 3, 2021

About

One of the leading retail stores in the US, Walmart, would like to predict the sales and demand accurately. There are certain events and holidays which impact sales on each day. There are sales data available for 45 stores of Walmart. The business is facing a challenge due to unforeseen demands and runs out of stock some times, due to the inappropriate machine learning algorithm. An 

ideal ML algorithm will predict demand accurately and ingest factors like economic conditions including CPI, Unemployment Index, etc.

 Walmart runs several promotional markdown events throughout the year. These markdowns precede prominent holidays, the four largest of all, which are the Super Bowl, Labour Day, Thanksgiving, and Christmas. The weeks including these holidays are weighted five times higher in the evaluation than non-holiday weeks. Part of the challenge presented by this competition is modeling the effects of markdowns on these holiday weeks in the absence of complete/ideal historical data. Historical sales data for 45 Walmart stores located in different regions are available.

 Dataset Description

This is the historical data which covers sales from 2010-02-05 to 2012-11-01, in the file Walmart_Store_sales. Within this file you will find the following fields:

·        Store - the store number

·        Date - the week of sales

·        Weekly_Sales - sales for the given store

·        Holiday_Flag - whether the week is a special holiday week 1 – Holiday week 0 – Non-holiday week

·        Temperature - Temperature on the day of sale

·        Fuel_Price - Cost of fuel in the region

·        CPI – Prevailing consumer price index

·        Unemployment - Prevailing unemployment rate

 Holiday Events

Super Bowl: 12-Feb-10, 11-Feb-11, 10-Feb-12, 8-Feb-13

Labour Day: 10-Sep-10, 9-Sep-11, 7-Sep-12, 6-Sep-13

Thanksgiving: 26-Nov-10, 25-Nov-11, 23-Nov-12, 29-Nov-13

Christmas: 31-Dec-10, 30-Dec-11, 28-Dec-12, 27-Dec-13

 Analysis Tasks

Basic Statistics tasks

1.     Which store has maximum sales

2.     Which store has maximum standard deviation i.e., the sales vary a lot. Also, find out the coefficient of mean to standard deviation

3.     Which store/s has good quarterly growth rate in Q3’2012

4.     Some holidays have a negative impact on sales. Find out holidays which have higher sales than the mean sales in non-holiday season for all stores together

5.     Provide a monthly and semester view of sales in units and give insights

 Statistical Model

For Store 1 – Build prediction models to forecast demand

·        Linear Regression – Utilize variables like date and restructure dates as 1 for 5 Feb 2010 (starting from the earliest date in order). Hypothesize if CPI, unemployment, and fuel price have any impact on sales.

·        Change dates into days by creating new variable.

Select the model which gives best accuracy.

More Details: Regression Analysis on Wallmart Sales Data