LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default HELP NEEDED - Iterative process in a VBA function

Hi Everybody,


I am trying to define a function that calculates a forward price, this
should be an iterative process and unfortunately I am not able to
properly define the required loop.

The function shown below performs the required calculation but it
should be repeated until the LOAN_AMOUNT + FPA_COST equals the
SETTLEMENT_AMOUNT. I have made the calculation manually in Excel and
the price is normally found in 3 to 5 steps.

Would anyone be able to define the required loop?

Many thanks in advance!,

Paul

---------------------------------

Function FPA_price(fraction, loan_amount, spot_price, coupon,
risk_free_rate, commision)

Dim bond_amount As Double
Dim fpa_cost As Double
Dim settlement_amount As Double

bond_amount = Round(loan_amount / (spot_price / 100), 0)
fpa_cost = (bond_amount * fraction * coupon / 4) - (loan_amount *
fraction * risk_free_rate / 4) + commision
settlement_amount = loan_amount - fpa_cost

FPA_price = Round(settlement_amount / bond_amount * 100, 6)

End Function







 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Major help needed - Iterative Functions LiAD Excel Programming 15 April 1st 09 08:30 PM
Iterative process of running queries frequently abends for no clr. LD Excel Programming 0 August 13th 08 10:11 PM
Process monitor macro needed Mark Creager Excel Programming 1 February 18th 08 02:33 PM
Iterative process, bioyyy Excel Discussion (Misc queries) 5 December 1st 05 02:07 AM
Urgent Help needed - I need to stop a process that is running forever in Excel shadestreet Excel Discussion (Misc queries) 2 October 6th 05 09:59 PM


All times are GMT +1. The time now is 08:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"