Skip to main content

All Questions

Tagged with
2 votes
1 answer
195 views

OrderBook Implementation - Follow up

This is a follow up to my previous implementation: The input is of the format ...
Avengerx9's user avatar
0 votes
1 answer
50 views

Aggregate transactions in slips

I wrote code to aggregate transactions in slips. I'm concerned with the performance of my code because it uses 3 loops that are nested so the time complexity will be cubic. This code won't scale well ...
bit's user avatar
  • 143
2 votes
1 answer
271 views

Heston model implementation in C++

I have implemented an option pricing algorithm following the Heston model. The simulation involves specifying the number of simulations, then generating a discretized path for each simulation (code ...
MattA's user avatar
  • 23
5 votes
1 answer
54 views

Calculate quote volumes (for a financial instrument) within numeric constraints

The function below is part of a trading system. Its purpose is to assign a volume (order size) to a bid (buy) quote and and ask (sell) quote, depending on the value of the ...
s_dbq's user avatar
  • 83
4 votes
2 answers
2k views

Pulling financial data via IEX Cloud API

I am pulling some financial data from the IEX Cloud API. Since it is a paid API w/ rate limits, I would like to do this as efficiently as possible (i.e., as few calls as possible). Given that the <...
user53526356's user avatar
1 vote
1 answer
50 views

Return timeframes relevant to just-elapsed time period (financial/trading context)

I am writing trading software, and have written this utility function. Its purpose is to return a list of timeframes relevant to the just-elapsed time period. "Timeframe" here means bar or candle ...
s_dbq's user avatar
  • 83
8 votes
2 answers
154 views

Developing an investment strategy based on stock movements

Below is my code ...
Pankaj Jain's user avatar
4 votes
1 answer
3k views

Calculate stock portfolio profit based on CSV data

import time import csv import argparse from nsetools import Nse from colorama import Fore nse = Nse() t = time.time() CSV file contains the following data, I ...
Dana's user avatar
  • 175
0 votes
1 answer
227 views

Finance manager

Somewhat experienced with JavaFX, but this is my first potentially large JavaFX project that I recently started and wanted some feedback on anything that could be done better or more efficiently thus ...
JSextonn's user avatar
  • 686
1 vote
1 answer
450 views

Finding cointegrated pair with minimal t-score

The function findMinimal() receives a tuple from a list which contains 171 tuples, each of them go into the function one by one and, for each tuple, it searches the ...
Artem Korol's user avatar
7 votes
1 answer
251 views

Thread-safe algorithm to make trades based on moving window of prices

Here is problem to be solved TradingAlgorithm employs a trading algorithm which, based on the prices it receives, will return a trade to execute. The trading algorithm must implement the ...
sam's user avatar
  • 73
6 votes
2 answers
2k views

Fastest possible Cython for Black-Scholes algorithm

I started with a pure python implementation, and have been trying to get the performance as close to native C as possible using numpy, numexpr, and cython. Here is the the numpy version that I ...
woodenToaster's user avatar
0 votes
1 answer
120 views

jQuery-loaded financial report taxes the browser

I load a table in a div using the .load() method. If I look on the console I see the times taken to display the table: 4.98 seconds that firebugs says are spent "...
Lelio Faieta's user avatar
3 votes
3 answers
192 views

Calculating highs, lows, and volumes of stocks

I'm trying to review and figure the issues in the above code. Any inputs to point out problems are welcome. ...
Sammy's user avatar
  • 31
2 votes
2 answers
712 views

Determining the next payment renewal date

I am not very good a JavaScript, surely not date manipulation, but I hacked together the script below with the purpose to determine the next payment renewal date based on a start date and payment term....
Martijn Burger's user avatar

15 30 50 per page