Questions tagged [stock]

1109 questions
6
votes
1 answer

Add variation stock quantity and status to Woocommerce product variation dropdown

Based on "Show stock status next to each attribute value in WooCommerce variable products", I have the following code that shows stock quantity + stock status in product variation dropdown and also as displayed product availability text:…
6
votes
2 answers

Influxdb for a financial application

I'm migrating my financial analysis application data from MongoDB to InfluxDB because the data and the analysis is growing exponentially. My current scenario is: 1) Get the tick every second from the exchanges and store it in a measurement called…
c0nf1ck
  • 329
  • 2
  • 13
6
votes
4 answers

How to add variation stock status to Woocommerce product variation dropdown

I would like to show the stock status (eg. In Stock / Out of Stock) for each product variation shown in the drop down list of variations on the Woocommerce Product Page. I have copied the relevant function to my theme's functions.php file, and can…
Chris M
  • 63
  • 1
  • 4
6
votes
2 answers

How to get products available quantity (Odoo v8 and v9)

I need to get products available quantity from odoo stock. There are several models I stock_quant, stock_move, stock_location. What I am trying to achieve are two things: Products total available quantity Products available quantity based on…
Tanzil Khan
  • 772
  • 6
  • 19
6
votes
2 answers

How to calculate realized P&L of stock trades using the FIFO method?

I'm looking for a Python plugin that would calculate the realized P&L for a number of stock transactions using the FIFO method. For example, assume we have the following three MSFT trades: +75 MSFT 25.10 +50 MSFT 25.12 -100 MSFT 25.22 The sell of…
Nikola Miles
  • 61
  • 1
  • 2
6
votes
3 answers

Calculate RSI(Relative Strength Index) using some programming language (JS/C#..)

I am working to calculate RSI (Relative Strength Index). I have data like this **Date|Close|Change|Gain|Loss** The formula for calculating this is RSI = 100 - 100/(1+RS) where RS = Average Gain / Average Loss Source So I want to calculate via some…
Blu
  • 3,836
  • 6
  • 33
  • 61
6
votes
1 answer

Simple algorithm modeling stock market behavior

I have been working on a virtual stock market game using PHP. The formula that I have been using for deciding the price of a stock is $price += $ran*0.001*$price + $ratio*0.005*$price where $ran = rand(-1*$intensity, 2*$intensity) $intensity is a…
Archit Verma
  • 1,662
  • 4
  • 26
  • 42
5
votes
3 answers

Charts for stock analysis applications

I'm trying to build a stock analysis application and it uses 3 kinds of charts Area Charts Candlestick Charts Combination Charts Currently i am doing this by using JQuery & Google charts and as u can see below its pretty awesome: But now , i was…
Shrayas
  • 6,040
  • 11
  • 34
  • 54
5
votes
3 answers

pandas combine stock data if it falls between specific time only in dataframe

I have minute-by-minute stock data from 2017 to 2019. I want to keep only data after 9:16 for each day therefore I want to convert any data between 9:00 to 9:16 as value of 9:16 ie: value of 09:16 should be open : value of 1st data from 9:00 - 9:16…
amitnair92
  • 407
  • 4
  • 17
5
votes
1 answer

How to calculate the most common time for max value per day of week in pandas

Using the yahoo finance package in python, I am able to download the relevant data to show OCHL. What I am aiming to do, is find which time during the day is when the stock is at its highest on average. Here is the code to download the data: import…
Ash
  • 53
  • 5
5
votes
2 answers

How to add custom stock status to products in WooCommerce 4+

I am using the following code to add new stock statuses in WooCommerce 4.0. The new statuses are: Preorder Contact us function add_custom_stock_type() { ?>