Find Jobs
Hire Freelancers

Write short rebalancing calculation code in Javascript or Php

$30-250 USD

Closed
Posted about 5 years ago

$30-250 USD

Paid on delivery
Write rebalancing calculation code in Javascript or Php. The code must be data based: arrays / objects of data. The goal of the project is to write a short rebalancing calculation code in Javascript or Php. Rebalancing is when you define a portfolio of x% of stock A, y% of stock B, and z% of stock C. After a while, stocks prices change, and we need to sell some stocks and buy others, to rebalance. E.g: We have 1000$. Stock A - cost 10$, we want our portolio to have 20% of stock A - 20 stocks total value 200$. Stock B - cost 15$, we want our portolio to have 30% of stock B - 20 stocks total value 300$. Stock C - cost 50$, we want our portolio to have 50% of stock C - 10 stocks total value 500$. a year has passed, now the prices are: Stock A - 5$, worth 100$ (5*20). Stock B - 15$, still worth 300$. Stock C - 40$, worth 400$ (10*40). Total worth: 800$. Now, stock A is 12.5% of the portfolio, so we need to buy more of it to make it 20%. stock B is 37.5% of the portfolio, so we need to sell some of it to make it 30%. stock C is 50% which is the goal, so we need to do nothing. Then another year will pass, and the same calculation again...
Project ID: 18798589

About the project

19 proposals
Remote project
Active 5 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of ISRAEL
Raanana, Israel
5.0
19
Payment method verified
Member since Jul 10, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759) & Freelancer Online India Private Limited (CIN U93000HR2011FTC043854)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.