Posts

Showing posts with the label eda

Arbitrage Trading Decision Model

Image
                                                     Directly taken from my Kaggle notebook The formula can be adapted into an arbitrage-trading decision model like below, but by itself it is not an arbitrage formula. R ( t ) = R max ⁡ m ( t ) = R max ⁡ 7 ∑ i = 1 7 s i ( t ) R(t)=R_{\max}m(t) =\frac{R_{\max}}{7}\sum_{i=1}^{7}s_i(t) where the 7 signals s i ( t ) s_i(t) are normalized signals and R ( t ) R(t) is a dynamically calculated risk/reward/allocation value. For arbitrage, I would use the same concept like this: A ( t ) = 1 7 ∑ i = 1 7 s i ( t ) A(t)=\frac{1}{7}\sum_{i=1}^{7}s_i(t) where the signals could be: Price spread Bid/ask spread Trading fees Slippage Market liquidity Transfer/settlement latency Historical spread reliability Then calculate the actual arbitrage profit: P arb = Q ( P sell − P buy ) − F buy − F sell − S buy − S sell − C trans...

Retail Demand Forecasting

Image
  Photo by RDNE Stock project on pexel Demand forecasting is a critical component of supply chain management. This solution uses historical data and machine learning algorithms to predict future demand. Data Requirements Historical sales data (3-5 years) Seasonal data (e.g., holidays, promotions) Product information (e.g., categories, subcategories) External data (e.g., weather, economic indicators) Data Preprocessing Data cleaning: Handle missing values, outliers, and data inconsistencies. Data transformation: Convert data into suitable formats for analysis. Feature engineering: Extract relevant features from data, such as: Time-based features (e.g., day of week, month) Seasonal features (e.g., holiday indicators) Product-based features (e.g., category, subcategory) Model Selection Choose a suitable algorithm based on data characteristics and performance metrics: Traditional methods: ARIMA (AutoRegressive Integrated Moving Average) Exponential Smoothing (ES) Naive Methods (e.g., m...

Exploratory Data Analysys Topics

Image
  Photo by <a href=”https://unsplash.com/@claybanks?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Clay Banks</a> Four main topics in EDA are Descriptive statistics Univariate analysis Bivariate analysis Multivariate analysis Dimensionality reduction Descriptive statistics are a set of methods used to summarize and describe the main features of a dataset, such as its central tendency, variability, and distribution. Some of the most common descriptive statistics include: Mean: The mean is the average of all the values in a dataset. Median: The median is the middle value in a dataset, when all the values are sorted from least to greatest. Mode: The mode is the most frequent value in a dataset. Range: The range is the difference between the largest and smallest values in a dataset. Variance: The variance is a measure of how spread out the values in a dataset are. Standard deviation: The standard deviation is a measure of how much variation the...