Questions tagged [finance]

Finance is for anything related to currency, payment systems, credit card number validation, etc.

Filter by
Sorted by
Tagged with
3
votes
1answer
109 views

C++ bond mathematics calculator

I have written a program in C++ that processes financial bond mathematics, making extensive use of the valarray class, so that mathematical functions and operations ...
1
vote
2answers
86 views

Refactoring legacy java banking code

Hey i have some legacy code i'm working on (It is open source so no problem in me sharing it!). I wanted to refactor some parts in the extractResult method since it ...
3
votes
3answers
20k views

Python 2.7 Payroll Calculator program

This is a calculator I'm working on. The ultimate goal is to calculate multiple payrolls before selecting to end the program, please review current version in that context. PSA: I'm a beginner. <...
4
votes
2answers
9k views

Bills and coin denomination program

I am currently in an intro C++ programming class. We have an assignment where we have to convert a dollar and cents amount, say $192.89, to bills and coins using the least amount of both. Below is the ...
2
votes
2answers
112 views

Simple credit card validation with Luhn's Algorithm

Originally written in C (which was abysmal, you may check here if you want), I rewrote my simple credit card validation program using Python ...
6
votes
2answers
2k views

Bank ATM program in Ruby

After reading a bunch of Ruby tutorials, I decide to write fake ATM bank software. I've tried to use OOP design and just want to know if I'm on the right road. ...
1
vote
0answers
34 views

quant. code. to calculate trend, momentum, correlation and volatility in Pandas(Python)

I am new to quant. finance and trying to calculate trend, momentum, correlation and ...
6
votes
1answer
4k views

Expense Tracker for keeping track of payment information

This system is an expense tracker. It allows ordinary people to track expenses, like bills, car notes, and keep up with the payments they make. I had this idea after my father and mother began to mess ...
4
votes
1answer
127 views

Volatility updating with Heston-Nandi model

I'm trying to program a volatility updating rule using iteration. I start with the well-known Heston-Nandi model where the returns dynamics are: $$ \left\{ \begin{array}{rcl} R_{t+1} &=&...
4
votes
2answers
5k views

Mortgage calculator

I feel that my app could be more efficient but I am not sure what else I can do. I feel like I could be reusing more. If you could give me some tips on how I could improve this, I would really ...
2
votes
1answer
14k views

OOP ATM application

As part of my studies, I need to gather peer feedback as part of my object-oriented ATM application. I have only used classes (inheritance etc.) and no GUI is required for this. Could you please give ...
5
votes
0answers
41 views

Compute a Working Capital Loan

This code takes a list of EBITDA amounts (for a hypothetical business), and computes a loan that would fund that business with working capital in periods of loss. When the business has positive EBITDA ...
6
votes
3answers
82k views

Savings account class and test program

My code is complete. It runs properly and produces the correct output. I did calculations by hand to check and then ran the program and it gives me the same result. I just want a second opinion. Are ...
1
vote
1answer
188 views

A Credit Payment Calculator

So I've attempted this project from hyperskills where you're asked to make a calculator script that can calculate annuity and differentiated payments given that 3 of 4 values are known. I think i went ...
4
votes
0answers
129 views

Model profit/loss of a time series of financial position state changes

I'm newly exploring time series databases, and trying to wrap my head around what data I'll store and how I'll query it. Also, I'm relatively new to TypeScript. This prototype exercises my current ...
4
votes
0answers
49 views

Analyze Stock Market Bottom Timing without Looping over Data Frame Rows

I am replicating this blog post in Python. The blog post shows that even if you know future stock market bottoms, only buying stocks when the stock market is below future stock market bottoms provides ...
1
vote
0answers
3k views

Barrier Option Pricing using Python

This is my implementation of pricing an exotic option (in this case an up-and-in barrier option) using the Monte Carlo simulation in Python. I use NumPy where I can. Any ideas to optimize this code? <...
5
votes
1answer
44 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 ...
5
votes
3answers
1k views

Dollar value of coins and calculating interest compounded annually

I've made this program to do a few integer calculations. Do the methods for converting the numbers look good? Do you have any other basic tips? ...
4
votes
0answers
44 views

Get Asset Returns for multiple Tickers and Holding Periods

I've written some code that will take multiple stock tickers and calculate their returns over yearly, monthly, bi-weekly, and weekly holding periods. The results are written to an xlsx file. I'm ...
8
votes
1answer
74k views

Simple ATM program with various options

This is not much of a question as more of an practice/experience project and feedback request. First off, this was a project I worked on when I started getting into Java last summer and had an ...
12
votes
4answers
21k views

Simple budget program

I've decided to start working on a budget application for the purposes of enhancing my Python skills. In its current form this program takes given expenses and income and tells the user whether they ...
5
votes
2answers
943 views

Calculating the necessary contribution to attain a savings goal with compound interest

This is a problem set from the MIT online course : Suppose you want to set a particular goal, e.g. to be able to afford the down payment in three years. How much should you save each month to ...
4
votes
2answers
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 <...
3
votes
2answers
3k views

JavaScript interest rate calculator

As I am still new to web development, refactoring my code is still something that gives me some trouble. I would really appreciate it if someone could look over the Javascript for an interest rate ...
0
votes
2answers
13k views

Income tax calculator [closed]

I've just started coding and have written a program to calculate your tax to be paid. Is there anywhere where I can improve this? ...
1
vote
1answer
41 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 ...
6
votes
2answers
267 views

Asynchronous IBAN API with validation

I am working on an iban api which is about saving the iban of some members after (iban validation) in a database. The code is split between Domain (entities, behaviour for iban validation), Database ...
4
votes
1answer
92 views

Simple income/expenses accounting program

I've decided to start working on a budget application for the purposes of getting started on Rust. In its current form this program takes given expenses and income and tells the user whether they have ...
7
votes
2answers
22k views

Bank account number validation in IBAN format

I wrote a JavaScript function for validating bank account numbers in IBAN format for my own joy. Could you have a look if you don't see any obvious mistakes or places for improvement? ...
5
votes
2answers
26k views

Cash-withdrawal from an ATM

I'm seeking review comments (design, performance, etc.) based on the problem statement: Write a CashWithDrawal function from an ATM which based on user specified amount dispenses bank notes. ...
3
votes
1answer
428 views

Python maintain precision for currency

Working with currencies I am aware it is not good to work with floating point values due to rounding and maintaining precision. Better is to work with integers. Would the following Currency class make ...
25
votes
4answers
16k views

Validating Credit Card Numbers

This is one of the puzzles I was trying to solve, where the question is to validate the credit card number with following characteristics: It must contain exactly 16 digits. It must start ...
2
votes
2answers
785 views

Loan repayment calculator

I am having some trouble figuring out how to modularize this code without rewriting it entirely. I know I should be able to break it up into modules for main, gathering info, doing calculation and the ...
59
votes
11answers
13k views

Sales tax calculator, rejected for being not OOP

I applied for an Application Developer position. They require all their applicants to complete 1 of 3 programming assignments. I picked one for sales tax calculation. It was quite simple. Write ...
3
votes
1answer
4k views

Calculate EMI based on principal, rate, duration (month or years)

I am trying to create an EMI calculator for a loan. The problem description is: Given a principal amount, rate of interest, monthly or quarterly installment terms and duration of loan in months/years ...
1
vote
1answer
174 views

Simple calculation of sector coefficients using PHP

Function This class extends the key class, called EQ, and does basic calculation based on minutely data. It then calculates weight coefficients (e.g., [0, 1]) for ...
3
votes
1answer
62 views

Mortgage calculator with Swing for Helsinki MOOC

New to Java, just finished the Helsinki MOOC course. I programmed a basic mortgage calculator as my first solo project and while it works, I have a few questions about coding style: The listener and ...
3
votes
1answer
431 views

Tracking stock prices using Python and Google Sheets

The purpose of this program is to keep track of some stocks that we bought in a game and every week we must list the closing prices of each stock in a Google Sheet. I thought since I had a lot of ...
5
votes
2answers
3k views

OOP bank account program in Python 3

Python beginner here. Building an OOP bank account program with SQLite and starting to struggle a bit with its design. From a design standpoint I have a file (bank) which calls ATM. ATM simulates an ...
3
votes
1answer
17k views

Simple bank account

I believe it is very much possible to make this code more efficient, possibly adding interfaces, inheritance or possibly divide the main class into more classes. I will improve some of the code such ...
0
votes
2answers
3k views

Loan calculator in C

I wanted to create a loan calculator, but the code I could think of was using 3 functions, and calling them and getting result. But I felt it was easy but bad code because I thought this can be ...
0
votes
1answer
768 views

Predicting credit card default

I have this code for predicting credit card default and it works perfectly, but I am checking here to see if anybody could make it more efficient or compact. It is pretty long though, but please bear ...
1
vote
1answer
200 views

Python 'Cashflow' object

In the code shown below, I have created 3 classes. The first of these are an 'Payment' class and a 'Annuity' class, which allow the user to create objects representing individual or recurring payments ...
0
votes
2answers
229 views

Python 'interest rate' object

I have only recently started learning python and the below is my attempt to create an 'interest rate' object which, given one of several types of interest/discount rate, gives the user access to all ...
5
votes
2answers
2k views

UK tax calculator

I'm very much on the beginner end of the PHP scale but I have read plenty of the entry level books and completed the online training at teamtreehouse.com so I know the basics. I'm at a point where I'...
1
vote
1answer
165 views

Renting vs. owning comparison calculation

I have working code that compares rental prices and owning costs, given some parameters. It works, but it surely does not look good. I hadn't worked with time-series before and I wonder how I could ...
3
votes
3answers
8k views

Safely convert dollars to cents

For my project, I need to convert dollar to cents, so I wrote the following function to safely do the conversion. The input dollar is float and the output should be ...
2
votes
2answers
65 views

The importance of consistency in percentage returns when investing

It is said that Being consistent in percentage annual returns leads to larger amount over time. That is for any given principal, getting 20% successively for 2 years is better than 30% for first ...
-1
votes
1answer
842 views

Compound interest calculator homework [closed]

I am a beginner at coding Java and am having a tough time understanding what is wrong with this code. This is an assignment I had posted about earlier and I also went to a Java tutor at my school for ...

1
2 3 4 5 6