110 likes | 226 Views
A JAVA Program for International Arbitrage. Contents of my Presentation. He Zhang 1814665. A JAVA Program for International Arbitrage. Environment. Applying Computer methods to the process of analyzing finance and economy will do help to improve the efficiency of working.
E N D
A JAVA Program for International Arbitrage Contents of my Presentation He Zhang 1814665
A JAVA Program for International Arbitrage Environment Applying Computer methods to the process of analyzing finance and economy will do help to improve the efficiency of working. Typical financial business system: card coupons trading system Financial management information systems: mainly have FMIS, OA The new financial business system: self-help bank business system, online banking system
A JAVA Program for International Arbitrage Topics arose This project is going to try to this initially by looking at a straightforward implementation based upon what’s called the JAVA application to help investors who want to have arbitrages. All this will be conducive to saner and less wrong financial decisions.
A JAVA Program for International Arbitrage Scope and purpose Scope: a well-designed JAVA application to analyze international arbitrages Purposes: Learn international arbitrage through building the International Arbitrage System Learn about the use of web services using query services Enhance the knowledge of JAVA and object orientated design Gain practical experience of JAVA development Gain the new knowledge about HTML PARSER
A JAVA Program for International Arbitrage Overview and structure
A JAVA Program for International Arbitrage What is international arbitrage Can be loosely defined as making a profit from a discrepancy in quoted prices. There are three common forms.
A JAVA Program for International Arbitrage My program import java.applet.Applet; import java.awt.BorderLayout; import java.awt.Frame; import java.awt.Panel; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowEvent; import java.awt.event.WindowListener; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JTextField; public class ExchangeRate extends Applet implements ActionListener { private JFrame frame=new JFrame("汇率转换"); private JTextField text1=new JTextField(); private JTextField text2=new JTextField(); private String s[]={"美元USD ","人民币CNY","日元 JPY", "欧元EUR","韩元KPW","加拿大元CAD","澳元AUD","英镑GBP","台币TWD","新西兰元NZD"}; private float rate[]={1,(float)6.8269,(float)89.1821992,(float)0.684134911,(float)1162.7907 , (float)1.06079974 ,(float)1.09793588 ,(float) 0.615763547 ,(float)32.1646832,(float)1.38159713}; private JComboBox cb=null; private JComboBox cb1=null; private double sum;//兑换后的金额 JLabel num=new JLabel("兑换金额"); JLabel money=new JLabel ("由 "); JLabel bmoney=new JLabel("兑换至 "); JLabel bnum=new JLabel("兑换后的金额为"); Panel p1; Panel p2; Panel p3; Panel p4; Panel p5; JButton button; public void init() { cb=new JComboBox(s); cb1=new JComboBox(s); text1 = new JTextField(15); text2= new JTextField(10) ; p1=new Panel(); p2=new Panel(); p3=new Panel(); p4=new Panel(); p5=new Panel(); p1.add(num,BorderLayout.WEST); p1.add(text1,BorderLayout.EAST); p2.add(money,BorderLayout.WEST); p2.add(cb,BorderLayout.EAST); p3.add(bmoney,BorderLayout.WEST); p3.add(cb1,BorderLayout.EAST); add(p1,BorderLayout.NORTH); add(p2,BorderLayout.CENTER); add(p3,BorderLayout.SOUTH); button=new JButton("兑换"); p4.add(button,BorderLayout.WEST); add(p4); p5.add(bnum,BorderLayout.WEST); p5.add(text2,BorderLayout.EAST); add(p5); //cb.addActionListener(this); //cb1.addActionListener(this); button.addActionListener(this); } public void actionPerformed(ActionEvent e) { JButton button1=(JButton) e.getSource(); java.text.DecimalFormat df=new java.text.DecimalFormat("#.000000"); String text=text1.getText(); String sum1; int cbx = cb.getSelectedIndex();//记录下标 int cb1x=cb1.getSelectedIndex(); if(button1==button) { sum=Float.parseFloat(text); if(sum>0) { sum1=df.format((double)rate[cb1x]/(double)rate[cbx]*sum); text2.setText(sum1); } else text2.setText("你输入的金额错误!"); } } public static void main(String[] args) { ExchangeRate er = new ExchangeRate(); Frame f = new Frame(); f.add(er); f.setSize(500, 500); er.init(); f.addWindowListener(new WindowListener(){ public void windowActivated(WindowEvent e) {} public void windowClosed(WindowEvent e) {} public void windowClosing(WindowEvent e) { e.getWindow().dispose(); } public void windowDeactivated(WindowEvent e) { } public void windowDeiconified(WindowEvent e) { } public void windowIconified(WindowEvent e) { } public void windowOpened(WindowEvent e) { } }); f.show(); } }
A JAVA Program for International Arbitrage Existing systems http://www.ftindia.com/solutions/brokeragesolutions/optsolutions.htm
A JAVA Program for International Arbitrage Conclusion To sum up, the project is about the international arbitrage. If you have some advises, you can mention it.
A JAVA Program for International Arbitrage Thank you !