Jump to content
Русский Золотой Портал

Финансовый калькулятор для операций с золотом 0.9.0b

   (0 reviews)

About This File

Финансовый калькулятор для операций с золотом версия 0.9b октябрь 2018 года.

Бесплатное программное обеспечение с открытым исходным кодом. Разработчик ООО Русский  золотой портал. Программа не содержит рекламных и иных скрытых от пользователя элементов.

Поддерживаемые платформы: Windows 7, Windows 8, Windows 10.

Калькулятор предназначен для расчетов форвардных цен, сложных процентных ставок с учетом капитализации процентов.

Для расчета процентных ставок с учетом капитализации процентов введите на экран простую ставку и выберите необходимый период капитализации в столбце IR (Interest Rates).

Например, 5/365 ведет расчет с учетом капитализации ежедневно в течение 5 дней (рабочих) недели и 365 дней в году.
1/360 - классическая ежедневная капитализация.

30/365 - ежемесячная капитализация.

1/4 - ежеквартальная.

1/2 - начисление процентов дважды в год.

GoldCalc09b.PNG


What's New in Version 0.9.0b

Released

Небольшие доработки внешнего вида.



User Feedback

Recommended Comments

Исходный код Финансового калькулятора  C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace GoldCalc
{
    public partial class Form1 : Form
    {
        double DisplayData = 0;
        bool DisplayDataNew = true;
        bool Dot , Operand = false;
        int OperandDo, gofo = 0;
        string DisplayDataNabor = "0";
        double MR1 = 0;
        double MR2 = 0;
        double DisplayData1, DisplayData2 = 0;
        public Form1()
        {
            InitializeComponent();
            
        }
        private void DisplayScreenText(string Text)
        {
            DisplayScreen.Text = Text;
        }

        private void buttonpm_Click(object sender, EventArgs e)
        {
            DisplayData = 0-DisplayData;
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
        }
        private void SignClearFull()
        {
         //   DisplayData = 0;
            DisplayDataNew = true;
            SignClear();
        }
        private void SignClear()
        {
            Dot = false;
        }
        private void button__Click(string clicker)
        {
            if (DisplayDataNew)
            {
                if (clicker != "0" || clicker != "00")

                {
                    DisplayDataNabor = clicker;
                    DisplayData = Convert.ToDouble(DisplayDataNabor);
                    DisplayScreenText(DisplayData.ToString());
                    DisplayDataNew = false;
                }

            }
            else
            {
                if (DisplayDataNabor == "0")
                {
                    if(clicker != "0" || clicker != "00")
                {
                        DisplayDataNabor = clicker;
                    }
                }
                else
                {
                    DisplayDataNabor = DisplayDataNabor + clicker;
                }
                DisplayData = Convert.ToDouble(DisplayDataNabor);
                DisplayScreenText(DisplayDataNabor);
            }


        }

        private void button1__Click(object sender, EventArgs e)
        {
            button__Click("1");
        }

        private void button2__Click(object sender, EventArgs e)
        {
            button__Click("2");
        }

        private void button3__Click(object sender, EventArgs e)
        {
            button__Click("3");
        }

        private void button4__Click(object sender, EventArgs e)
        {
            button__Click("4");
        }

        private void button5__Click(object sender, EventArgs e)
        {
            button__Click("5");
        }

        private void button6__Click(object sender, EventArgs e)
        {
            button__Click("6");
        }

        private void button7__Click(object sender, EventArgs e)
        {
            button__Click("7");
        }

        private void button8__Click(object sender, EventArgs e)
        {
            button__Click("8");
        }

        private void button9__Click(object sender, EventArgs e)
        {
            button__Click("9");
        }

        private void button0__Click(object sender, EventArgs e)
        {
            button__Click("0");
        }

        private void button00__Click(object sender, EventArgs e)
        {
            button__Click("00");
        }

        private void buttonAC_Click(object sender, EventArgs e)
        {
            DisplayData = 0;
            DisplayDataNew = true;
            Dot = false;
            DisplayDataNabor = "0";
            DisplayScreenText(DisplayDataNabor);
            Operand = false;
            OperandDo = 0;
            gofo = 0;
        }

        private void buttondot_Click(object sender, EventArgs e)
        {
            if (!Dot)
            {
                DisplayDataNabor = DisplayDataNabor + ",";
                Dot = true;
                DisplayData = Convert.ToDouble(DisplayDataNabor);
                DisplayScreenText(DisplayDataNabor);
                Operand = false;
                OperandDo = 0;
                gofo = 0;
            }
        }

        private void buttonSqrt_Click(object sender, EventArgs e)
        {
            DisplayData = Math.Sqrt(DisplayData);
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
            Operand = false;
            OperandDo = 0;
            // SignClear();

        }

        private void button1divideX_Click(object sender, EventArgs e)
        {
            DisplayData = 1/DisplayData;
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
            Operand = false;
            OperandDo = 0;
        }

        private void buttonPI_Click(object sender, EventArgs e)
        {
            DisplayData = Math.PI;
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
            Operand = false;
            OperandDo = 0;
        }

        private void buttonGrOz_Click(object sender, EventArgs e)
        {
            DisplayData = DisplayData/31.1034807;
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
        }

        private void buttonOzGr_Click(object sender, EventArgs e)
        {
            DisplayData = DisplayData * 31.1034807;
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
            Operand = false;
            OperandDo = 0;
        }

        private void buttonMR_Click(object sender, EventArgs e)
        {
            DisplayData = MR1;
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
            Operand = false;
            OperandDo = 0;
        }

        private void buttonMplus_Click(object sender, EventArgs e)
        {
            MR1 = MR1 + DisplayData;
        }

        private void buttonMminus_Click(object sender, EventArgs e)
        {
            MR1 = MR1 - DisplayData;
        }

        private void buttonMC_Click(object sender, EventArgs e)
        {
            MR1 = 0;
        }

        private void buttonMIIR_Click(object sender, EventArgs e)
        {
            DisplayData = MR2;
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
        }

        private void buttonMIIplus_Click(object sender, EventArgs e)
        {
            MR2 = MR2 + DisplayData;
        }

        private void buttonMIIC_Click(object sender, EventArgs e)
        {
            MR2 = 0;
        }

        private void buttonMulti_Click(object sender, EventArgs e)
        {
            if (Operand)
            {
                DisplayData = DisplayData * DisplayData1;
                DisplayData1 = DisplayData;
            }
            else
            {
                DisplayData1 = DisplayData;
                DisplayData = 0;

                Operand = true;
            }
            SignClearFull();
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
            OperandDo = 1; //умножение
        }

        private void buttonPlus_Click(object sender, EventArgs e)
        {
            if (Operand)
            {
                DisplayData = DisplayData + DisplayData1;
                DisplayData1 = DisplayData;
            }
            else
            {
                DisplayData1 = DisplayData;
                DisplayData = 0;

                Operand = true;
            }
            SignClearFull();
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
            OperandDo = 3; // +
        }

        private void buttonDivide_Click(object sender, EventArgs e)
        {
            if (Operand)
            {
                DisplayData = DisplayData1 / DisplayData;
                DisplayData1 = DisplayData;
            }
            else
            {
                DisplayData1 = DisplayData;
                DisplayData = 0;

                Operand = true;
            }
            SignClearFull();
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
            OperandDo = 2; //деление
        }

        private void buttonMinus_Click(object sender, EventArgs e)
        {
            if (Operand)
            {
                DisplayData = DisplayData1 - DisplayData;
                DisplayData1 = DisplayData;
            }
            else
            {
                DisplayData1 = DisplayData;
                DisplayData = 0;

                Operand = true;
            }
            SignClearFull();
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
            OperandDo = 4; //вычитание
        }

        private void buttonEQ_Click(object sender, EventArgs e)
        {
            if (Operand)
            {
                switch (OperandDo)
                {
                    case 1:
                        DisplayData = DisplayData * DisplayData1;
                        break;
                    case 2:
                        DisplayData = DisplayData1 / DisplayData;
                        break;
                    case 3:
                        DisplayData = DisplayData + DisplayData1;
                        break;
                    case 4:
                        DisplayData = DisplayData1 - DisplayData;
                        break;
                    default:
                       
                        break;
                }

                
                DisplayData1 = DisplayData;
            }
            else
            {
                
            }
            SignClearFull();
            Operand = false;
            OperandDo = 0;
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
        }

        private void button995_Click(object sender, EventArgs e)
        {
            DisplayData = DisplayData * 1000 / 995;
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
            Operand = false;
            OperandDo = 0;
        }

        private void button999_Click(object sender, EventArgs e)
        {
            DisplayData = DisplayData * 1000 / 999;
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
            Operand = false;
            OperandDo = 0;
        }

        private void button9999_Click(object sender, EventArgs e)
        {
            DisplayData = DisplayData * 1000 / 9999;
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
            Operand = false;
            OperandDo = 0;
        }

        private void buttonIR5x365_Click(object sender, EventArgs e)
        {
            
            int days = 0;
            double irnow = 1;
       
            irnow = (1+DisplayData * 5 / 365 /100);
            while (days <= 365)
            {
                irnow = irnow * (1+DisplayData * 5 / 365 /100);
                days = days +5;
            }
            DisplayData = irnow + DisplayData; ;

            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
            Operand = false;
            OperandDo = 0;

        }

        private void buttonIR1x360_Click(object sender, EventArgs e)
        {
            DisplayData = DisplayData + Math.Pow((1 + DisplayData/100/360), 360);
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
            Operand = false;
            OperandDo = 0;
        }

        private void buttonIR30x360_Click(object sender, EventArgs e)
        {
            DisplayData = DisplayData + Math.Pow((1 + DisplayData / 100 / 12), 12);
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
            Operand = false;
            OperandDo = 0;
        }

        private void button750_Click(object sender, EventArgs e)
        {
            DisplayData = DisplayData + Math.Pow((1 + DisplayData / 100 / 52.14), 52.14);
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
            Operand = false;
            OperandDo = 0;
        }

        private void button583_Click(object sender, EventArgs e)
        {
            DisplayData = DisplayData + Math.Pow((1 + DisplayData / 100 / 4), 4);
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
            Operand = false;
            OperandDo = 0;
        }

        private void button155_Click(object sender, EventArgs e)
        {
            DisplayData = DisplayData + Math.Pow((1 + DisplayData / 100 / 2), 2);
            DisplayDataNabor = DisplayData.ToString();
            DisplayScreenText(DisplayDataNabor);
            Operand = false;
            OperandDo = 0;
        }

        private void buttonGOFO_Click(object sender, EventArgs e)
        {
            switch (gofo)
            {
                case 0:
                    DisplayData1 = DisplayData;
                    DisplayData = 0;
                    DisplayDataNabor = DisplayData.ToString();
                    DisplayScreenText(DisplayDataNabor);
                    gofo = 1;
                    break;
                case 1:
                    DisplayData2 = DisplayData;
                    DisplayData = 0;
                    DisplayDataNabor = DisplayData.ToString();
                    DisplayScreenText(DisplayDataNabor);
                    gofo = 2;
                    break;
                case 2:
                    DisplayData = DisplayData1 + DisplayData1 * DisplayData2/100 * DisplayData/365;
                    DisplayDataNabor = DisplayData.ToString();
                    DisplayScreenText(DisplayDataNabor);
                    gofo = 0;
                    break;
                default:
                   break;
            }

        }
    }
}

 

Share this comment


Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...