Skip to content

TheHarshal30/Quantum-Finance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Quantum Dynamic Pricing

TensorFlow Python


Context

Pricing is very strategic and it makes a big difference in how a business operates. Many businesses operate on a fixed pricing model comes with serious drawbacks. It relies on fickle buyers who are price sensitive. This makes you more vulnerable to price wars. If one of your competitors drops their prices, your buyers are at risk of jumping ship. Also fixed-price model throttles long-term relationships. You don’t have time to connect with customers.
This is where Dynamic Pricing comes to save the day!


What is Dynamic Pricing ?

Dynamic pricing, a strategy which enables businesses to provide flexible prices for products and services is now catching on across hospitality, retail, travel and entertainment industry segments. Whether the aim is to stay profitable, fill up an airplane or sell as many sports tickets or products online as possible, companies today are using dynamic pricing to achieve their business goals.


Dataset

Dynamic Pricing can be applied to various buissness, but here we apply it to predict fare prices of OLA CABS.
The dataset contains various parameters on which the price of fare depends.
Click here to download the dataset.


Methodology:

  • Dynamic Price Prediction :
    • Converting Classical data into Quantum Data :
      We convert all the classical data into a circuit.
      The encoder used here is:
      RX * (pi * i)
      RY * (pi * i)
      where i belongs to [0,1] (i.e normalized data).
    • Quantum Layers :
      A layer consists of CNOT gate followed by RY and RZ gates
    • Model :
      We create the Quantum model using Google's Cirq.
      We know that, the number of parameters is 2 paramenters per Qubit multiplied by depth of circuit.
  • Optimal Discount Pricing :
    We also made a Optimal Discount Pricing Engine using Dwave's Simulated Annealing Sampler.(Ising Model)
    We have demonstrated the results using sample data for ease of understanding.



Conclusion:

Even with small number of epochs and short circuit depth the loss is pretty good.
Implementing the code on Quantum Hardware with high number of epoches and large circuit depths would result in great accuracies in very less time.

TechStack Used:

  • Cirq
  • Tensorflow Quantum
  • Dwave Systems
  • Pandas
  • Numpy

Support

⭐ Please Star and share the project. Thanks! ❤️