![]() In this example, the breakeven point is $38.40, not including commissions. The maximum risk of a covered call equals purchasing stock at the breakeven point. In this example, the breakeven point on a per-share basis is $39.30 – $0.90 = $38.40, commissions not included. Commissions are not included in this calculation for the sake of simplicity.Ī covered call position breaks even at expiration at a stock price equal to the purchase price of the stock minus the call premium. The maximum profit potential is the sum of the call premium and the difference between the strike price and the stock price. The maximum profit potential of a covered call is achieved if the stock price is at or above the strike price of the call at expiration. Below the breakeven point a covered call position has the full risk of stock ownership. Below the strike price, the profit is reduced as the stock price declines to the breakeven point. In this example, the strike price is $40. Note that the covered call has limited profit potential, which is achieved if the stock price is at or above the strike price of the call at expiration. The solid green line is the covered call position, which is the combination of the purchased stock and the sold call. In the diagram below, the hyphenated light-blue line that slopes from lower left to upper right shows just the stock position, which is purchased at $39.30 per share. ![]() The horizontal axis in a profit-loss diagram shows a range of stock prices and the vertical axis shows profit or loss on a per-share basis. Note that the diagram is drawn on a per-share basis and commissions are not included. The next step in analyzing a covered call position is drawing a profit-loss diagram, which shows the maximum profit potential, the maximum risk potential, and the breakeven point at expiration. It is also necessary to calculate important aspects of a covered call position, such as the maximum profit potential, the maximum risk potential, and the breakeven point at expiration. This information is needed to draw a profit-loss diagram. if you want to then stick the $ in front once calculation is complete say txtAnswer = $ & profit.The information used to calculate the actual dollar amount is useful for other reasons as well. Get rid of the "$" and just add the values. Ok I never add currency symbols so I'm not sure what CDbl(("$" & Val(Sum) - Val(txtWages.Text))) will do as it may treat it as a string character "$" rather than a currency. you will need to do this whenever profit changed. Profit = CDbl(("$" & Val(sum) - Val(txtUtilities.Text)))Ī bit untidy but that should do it. Profit = CDbl(("$" & Val(sum) - Val(txtRent.Text))) Profit = CDbl(("$" & Val(sum) - Val(txtWages.Text))) So the above code is going to fire itself each time it changes! Just pop profit into txt Answer each time it is calculated If chkWages.Checked Then You are using TextChanged Event for txtAnswer Private Sub txtAnswer_TextChanged(sender As Object, e As EventArgs) Handles txtAnswer.TextChanged Profit = CDbl(("$" & Val(sum) - (Val(txtUtilities.Text) + Val(txtWages.Text) + Val(txtRent.Text)))) Profit = CDbl(("$" & Val(sum) - (Val(txtRent.Text) + Val(txtWages.Text) + Val(txtUtilities.Text)))) Profit = CDbl(("$" & Val(sum) - (Val(txtWages.Text) + Val(txtRent.Text) + Val(txtUtilities.Text)))) MessageBox.Show("The file profit.txt has not been read in yet, the profit will be set to zero.") Private Sub menComputeProfit_Click(sender As Object, e As EventArgs) Handles menComputeProfit.Click Profit = (sum - CDbl(txtWages.Text) - CDbl(txtRent.Text) - CDbl(txtUtilities.Text)) Private Sub radSandO_CheckedChanged(sender As Object, e As EventArgs) Handles radSandO.CheckedChanged Private Sub radSales_CheckedChanged(sender As Object, e As EventArgs) Handles radSales.CheckedChanged Private Sub menExit_Click(sender As Object, e As EventArgs) Handles menExit.Click MessageBox.Show("You cannot use that file!") ![]() Using reader As New StreamReader(ofd.OpenFile) If selectedFileName.ToLower = "profit.txt" Then ![]() If ofd.ShowDialog() = Thenĭim selectedFileName As String = System.IO.Path.GetFileName(ofd.FileName) Ofd.InitialDirectory = Environment.GetFolderPath() Ofd.Filter = "text files |*.txt|All Files|*.*" Private Sub menOpen_Click(sender As Object, e As EventArgs) Handles menOpen.Click It is then to use information gathered from a series of check boxes and text boxes to calculate the final profit.Īs the code is written now, the profit is only correct if all check boxes are selected, but I need it to be correct if one, two, or all three are checked. This program is supposed to read in values from a text file and get a sum of all these values.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |